00001 // This is core/vnl/vnl_fortran_copy.h 00002 #ifndef vnl_fortran_copy_h_ 00003 #define vnl_fortran_copy_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 // \endverbatim 00020 // 00021 //----------------------------------------------------------------------------- 00022 00023 #include <vnl/vnl_matrix.h> 00024 //: Convert row-stored matrix to column-stored. 00025 // Convert C format (row-stored) matrix to fortran format (column-stored) matrix. 00026 template <class T> 00027 class vnl_fortran_copy 00028 { 00029 public: 00030 // Constructors/Destructors-------------------------------------------------- 00031 00032 vnl_fortran_copy(vnl_matrix<T> const & M); 00033 00034 ~vnl_fortran_copy(); 00035 00036 // Operations---------------------------------------------------------------- 00037 operator T*() { return data; } 00038 00039 protected: 00040 // Data Members-------------------------------------------------------------- 00041 int sz; 00042 T *data; 00043 00044 private: 00045 // Helpers------------------------------------------------------------------- 00046 }; 00047 00048 #endif // vnl_fortran_copy_h_