core/vnl/vnl_fortran_copy_fixed.h
Go to the documentation of this file.
00001 // This is core/vnl/vnl_fortran_copy_fixed.h
00002 #ifndef vnl_fortran_copy_fixed_h_
00003 #define vnl_fortran_copy_fixed_h_
00004 #ifdef VCL_NEEDS_PRAGMA_INTERFACE
00005 #pragma interface
00006 #endif
00007 //:
00008 // \file
00009 // \brief Convert row-stored matrix to column-stored
00010 // \author Andrew W. Fitzgibbon, Oxford RRG
00011 // \date   29 Aug 96
00012 //
00013 // convert C format (row-stored) matrix to fortran format (column-stored) matrix
00014 //
00015 // \verbatim
00016 //  Modifications
00017 //   LSB (Manchester) 23/3/01 Tidied documentation
00018 //   Feb.2002 - Peter Vanroose - brief doxygen comment placed on single line
00019 //   Oct.2009 - Converted for a stack-storage fixed-size version
00020 // \endverbatim
00021 //
00022 //-----------------------------------------------------------------------------
00023 
00024 #include <vnl/vnl_matrix_fixed.h>
00025 //:  Convert row-stored matrix to column-stored.
00026 //  Convert C format (row-stored) matrix to fortran format (column-stored) matrix.
00027 template <class T, unsigned R, unsigned C>
00028 class vnl_fortran_copy_fixed
00029 {
00030  public:
00031   // Constructors/Destructors--------------------------------------------------
00032 
00033   vnl_fortran_copy_fixed(vnl_matrix_fixed<T, R, C> const & M);
00034 
00035   // Operations----------------------------------------------------------------
00036   operator T*() { return data; }
00037 
00038  protected:
00039   // Data Members--------------------------------------------------------------
00040   T data[R*C];
00041 
00042  private:
00043   // Helpers-------------------------------------------------------------------
00044 };
00045 
00046 #endif // vnl_fortran_copy_fixed_h_