Changeset 318 in flair-src for trunk/lib/FlairCore/src
- Timestamp:
- Jul 3, 2019, 5:05:33 PM (5 years ago)
- Location:
- trunk/lib/FlairCore/src
- Files:
-
- 4 deleted
- 4 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/FlairCore/src/Matrix.cpp
r252 r318 107 107 } 108 108 109 Matrix::Matrix(const Object *parent, const cvmatrix_descriptor *descriptor,109 Matrix::Matrix(const Object *parent, const MatrixDescriptor *descriptor, 110 110 ScalarType const &elementDataType, string name, uint32_t n) 111 111 : io_data(parent, name, n), -
trunk/lib/FlairCore/src/Matrix.h
r252 r318 16 16 #include <io_data.h> 17 17 #include <IODataElement.h> 18 #include < cvmatrix_descriptor.h>18 #include <MatrixDescriptor.h> 19 19 20 20 class Matrix_impl; … … 52 52 * 53 53 * Construct an io_data representing a matrix. \n 54 * It uses a cvmatrix_descriptor to get size and elements' names. \n54 * It uses a MatrixDescriptor to get size and elements' names. \n 55 55 * Names are used for graphs and logs. \n 56 56 * All values are initialized to 0. … … 62 62 * \param n number of samples 63 63 */ 64 Matrix(const Object *parent, const cvmatrix_descriptor *descriptor,64 Matrix(const Object *parent, const MatrixDescriptor *descriptor, 65 65 ScalarType const &elementDataType, std::string name = "", 66 66 uint32_t n = 1); … … 145 145 * \brief Element name 146 146 * 147 * If Matrix was created without cvmatrix_descriptor, element name is empty.147 * If Matrix was created without MatrixDescriptor, element name is empty. 148 148 * 149 149 * \param row element row -
trunk/lib/FlairCore/src/MatrixDescriptor.cpp
r317 r318 4 4 // %flair:license} 5 5 // created: 2014/02/05 6 // filename: cvmatrix_descriptor.cpp6 // filename: MatrixDescriptor.cpp 7 7 // 8 8 // author: Guillaume Sanahuja … … 11 11 // version: $Id: $ 12 12 // 13 // purpose: Class describing cvmatrix elements, for log and graphs purpose13 // purpose: Class describing matrix elements, for log and graphs purpose 14 14 // 15 15 /*********************************************************************/ 16 16 17 #include " cvmatrix_descriptor.h"17 #include "MatrixDescriptor.h" 18 18 #include "FrameworkManager.h" 19 19 … … 23 23 namespace core { 24 24 25 cvmatrix_descriptor::cvmatrix_descriptor(uint32_t rows, uint32_t cols) {25 MatrixDescriptor::MatrixDescriptor(uint32_t rows, uint32_t cols) { 26 26 this->rows = rows; 27 27 this->cols = cols; … … 36 36 } 37 37 38 cvmatrix_descriptor::~cvmatrix_descriptor() {38 MatrixDescriptor::~MatrixDescriptor() { 39 39 for (uint32_t i = 0; i < rows * cols; i++) { 40 40 delete element_names[i]; … … 43 43 } 44 44 45 void cvmatrix_descriptor::SetElementName(uint32_t row, uint32_t col,45 void MatrixDescriptor::SetElementName(uint32_t row, uint32_t col, 46 46 string name) { 47 47 if (row >= rows || col >= cols) { … … 53 53 } 54 54 55 string cvmatrix_descriptor::ElementName(uint32_t row, uint32_t col) const {55 string MatrixDescriptor::ElementName(uint32_t row, uint32_t col) const { 56 56 if (row >= rows || col >= cols) { 57 57 getFrameworkManager()->Err("index out of bound (%i,%i), max (%i,%i)\n", … … 62 62 } 63 63 64 uint32_t cvmatrix_descriptor::Rows() const { return rows; }64 uint32_t MatrixDescriptor::Rows() const { return rows; } 65 65 66 uint32_t cvmatrix_descriptor::Cols() const { return cols; }66 uint32_t MatrixDescriptor::Cols() const { return cols; } 67 67 68 68 } // end namespace core -
trunk/lib/FlairCore/src/MatrixDescriptor.h
r317 r318 4 4 // %flair:license} 5 5 /*! 6 * \file cvmatrix_descriptor.h7 * \brief Class describing cvmatrix elements, for log and graphs purpose6 * \file MatrixDescriptor.h 7 * \brief Class describing matrix elements, for log and graphs purpose 8 8 * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253 9 9 * \date 2014/02/05 … … 11 11 */ 12 12 13 #ifndef CVMATRIX_DESCRIPTOR_H14 #define CVMATRIX_DESCRIPTOR_H13 #ifndef MATRIXDESCRIPTOR_H 14 #define MATRIXDESCRIPTOR_H 15 15 16 16 #include <string> … … 19 19 namespace core { 20 20 21 /*! \class cvmatrix_descriptor21 /*! \class MatrixDescriptor 22 22 * 23 * \brief Class describing cvmatrix elements, for log and graphs purpose23 * \brief Class describing matrix elements, for log and graphs purpose 24 24 * 25 25 * This class allows to give a name to matrix elements. These names 26 26 * will be used in graphs and logs. 27 27 */ 28 class cvmatrix_descriptor {28 class MatrixDescriptor { 29 29 public: 30 30 /*! … … 36 36 * \param cols matrix cols 37 37 */ 38 cvmatrix_descriptor(uint32_t rows, uint32_t cols);38 MatrixDescriptor(uint32_t rows, uint32_t cols); 39 39 40 40 /*! … … 42 42 * 43 43 */ 44 ~ cvmatrix_descriptor();44 ~MatrixDescriptor(); 45 45 46 46 /*! … … 85 85 } // end namespace flair 86 86 87 #endif // CVMATRIX_DESCRIPTOR_H87 #endif // MATRIXDESCRIPTOR_H -
trunk/lib/FlairCore/src/Matrix_impl.cpp
r214 r318 27 27 int n) 28 28 : elementDataType(_elementDataType) { 29 descriptor = new cvmatrix_descriptor(rows, cols);29 descriptor = new MatrixDescriptor(rows, cols); 30 30 Init(self, n); 31 31 } 32 32 33 33 Matrix_impl::Matrix_impl(Matrix *self, 34 const cvmatrix_descriptor *inDescriptor,34 const MatrixDescriptor *inDescriptor, 35 35 flair::core::ScalarType const &_elementDataType, 36 36 int n) 37 37 : elementDataType(_elementDataType) { 38 descriptor = new cvmatrix_descriptor(inDescriptor->Rows(), inDescriptor->Cols());38 descriptor = new MatrixDescriptor(inDescriptor->Rows(), inDescriptor->Cols()); 39 39 40 40 for (uint32_t i = 0; i < descriptor->Rows(); i++) { -
trunk/lib/FlairCore/src/unexported/Matrix_impl.h
r214 r318 27 27 flair::core::ScalarType const &elementDataType, int n); 28 28 Matrix_impl(flair::core::Matrix *self, 29 const flair::core:: cvmatrix_descriptor *descriptor,29 const flair::core::MatrixDescriptor *descriptor, 30 30 flair::core::ScalarType const &elementDataType, int n); 31 31 ~Matrix_impl(); 32 32 33 33 flair::core::ScalarType const &elementDataType; 34 flair::core:: cvmatrix_descriptor *descriptor;34 flair::core::MatrixDescriptor *descriptor; 35 35 void *datas; 36 36 void SetValueNoMutex(uint32_t row, uint32_t col, float value);
Note:
See TracChangeset
for help on using the changeset viewer.