vnl_fortran_copy.h

来自「InsightToolkit-1.4.0(有大量的优化算法程序)」· C头文件 代码 · 共 50 行

H
50
字号
// This is vxl/vnl/vnl_fortran_copy.h
#ifndef vnl_fortran_copy_h_
#define vnl_fortran_copy_h_
#ifdef VCL_NEEDS_PRAGMA_INTERFACE
#pragma interface
#endif
//:
//  \file
//  \brief Convert row-stored matrix to column-stored
//
// convert C format (row-stored) matrix to fortran format (column-stored) matrix
//
//  \author Andrew W. Fitzgibbon, Oxford RRG
//  \date   29 Aug 96
//
// \verbatim
//   Modifications:
//   LSB (Manchester) 23/3/01 Tidied documentation
//   Feb.2002 - Peter Vanroose - brief doxygen comment placed on single line
// \endverbatim
//
//-----------------------------------------------------------------------------

#include <vnl/vnl_matrix.h>
//:  Convert row-stored matrix to column-stored.
//  Convert C format (row-stored) matrix to fortran format (column-stored) matrix.
template <class T>
class vnl_fortran_copy
{
 public:
  // Constructors/Destructors--------------------------------------------------

  vnl_fortran_copy(vnl_matrix<T> const & M);

  ~vnl_fortran_copy();

  // Operations----------------------------------------------------------------
  operator T*() { return data; }

 protected:
  // Data Members--------------------------------------------------------------
  int sz;
  T *data;

 private:
  // Helpers-------------------------------------------------------------------
};

#endif // vnl_fortran_copy_h_

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?