eLynx SDK
v3.3.0 C++ image processing API reference |
00001 //============================================================================ 00002 // MatrixColVector.h Math.Component package 00003 //============================================================================ 00004 // Usage : linear algebra - vector-style matrix column adapter 00005 //---------------------------------------------------------------------------- 00006 // Copyright (C) 2006 by eLynx project 00007 // 00008 // This library is free software; you can redistribute it and/or 00009 // modify it under the terms of the GNU Library General Public 00010 // License as published by the Free Software Foundation; either 00011 // version 2 of the License, or (at your option) any later version. 00012 // 00013 // This library is distributed in the hope that it will be useful, 00014 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00016 // See the GNU Library General Public License for more details. 00017 //---------------------------------------------------------------------------- 00018 #ifndef __MatrixColVector_h__ 00019 #define __MatrixColVector_h__ 00020 00021 #include "IVector.h" 00022 #include "IMatrix.h" 00023 00024 namespace eLynx { 00025 namespace Math { 00026 00032 class ExportedByMath MatrixColVector : public IVector { 00033 00034 public: 00035 00040 MatrixColVector(IMatrix &iMatrix, uint32 iCol); 00041 00044 MatrixColVector(const MatrixColVector &iC); 00045 00049 MatrixColVector& operator = (const MatrixColVector &iC); 00050 00053 virtual uint32 GetSize() const { return _prMatrix.GetHeight(); } 00054 00059 virtual const double& operator () (uint32 iIndex) const 00060 { return _prMatrix(iIndex, _Col); } 00061 00066 virtual double& operator () (uint32 iIndex) 00067 { return _prMatrix(iIndex, _Col); } 00068 00072 virtual void SwapValues(uint32 iIndex1, uint32 iIndex2); 00073 00074 private: 00075 00078 void CopyData(const MatrixColVector &iC); 00079 00081 IMatrix& _prMatrix; 00082 00084 uint32 _Col; 00085 00086 }; 00087 00088 } // namespace Math 00089 } // namespace eLynx 00090 00091 00092 #endif // __MatrixColVector_h__