core/vnl/vnl_double_2x3.h
Go to the documentation of this file.
00001 // This is core/vnl/vnl_double_2x3.h
00002 #ifndef vnl_double_2x3_h_
00003 #define vnl_double_2x3_h_
00004 #ifdef VCL_NEEDS_PRAGMA_INTERFACE
00005 #pragma interface
00006 #endif
00007 //:
00008 // \file
00009 // \brief 2x3 matrix of double
00010 // \author Andrew W. Fitzgibbon, Oxford RRG
00011 // \date   23 Dec 96
00012 //
00013 // \verbatim
00014 //  Modifications
00015 //   Peter Vanroose, 25 June 1999: no need to use #pragma instantiate anymore
00016 //   Peter Vanroose, 21 Oct 1999: vnl_matrix_fixed<double,2,3> already instantiated
00017 // \endverbatim
00018 //
00019 //-----------------------------------------------------------------------------
00020 
00021 #include <vnl/vnl_matrix_fixed.h>
00022 #include <vnl/vnl_double_3.h>
00023 
00024 class vnl_double_2x3 : public vnl_matrix_fixed<double, 2, 3>
00025 {
00026   typedef vnl_matrix_fixed<double, 2, 3> Base;
00027  public:
00028 
00029   vnl_double_2x3() {}
00030   vnl_double_2x3(const vnl_double_3& row1, const vnl_double_3& row2)
00031   {
00032     vnl_double_2x3& M = *this;
00033     M(0,0) = row1[0];    M(0,1) = row1[1];    M(0,2) = row1[2];
00034     M(1,0) = row2[0];    M(1,1) = row2[1];    M(1,2) = row2[2];
00035   }
00036 
00037   vnl_double_2x3(double r00, double r01, double r02,
00038                  double r10, double r11, double r12)
00039   {
00040     vnl_double_2x3& M = *this;
00041     M(0,0) = r00;    M(0,1) = r01;    M(0,2) = r02;
00042     M(1,0) = r10;    M(1,1) = r11;    M(1,2) = r12;
00043   }
00044 
00045   vnl_double_2x3(Base const& M) : Base(M) { }
00046 };
00047 
00048 #endif // vnl_double_2x3_h_