Changeset 318 in flair-src for trunk/lib


Ignore:
Timestamp:
Jul 3, 2019, 5:05:33 PM (2 years ago)
Author:
Sanahuja Guillaume
Message:
Location:
trunk/lib
Files:
4 deleted
28 edited
2 moved

Legend:

Unmodified
Added
Removed
  • trunk/lib/FlairCore/src/Matrix.cpp

    r252 r318  
    107107}
    108108
    109 Matrix::Matrix(const Object *parent, const cvmatrix_descriptor *descriptor,
     109Matrix::Matrix(const Object *parent, const MatrixDescriptor *descriptor,
    110110                   ScalarType const &elementDataType, string name, uint32_t n)
    111111    : io_data(parent, name, n),
  • trunk/lib/FlairCore/src/Matrix.h

    r252 r318  
    1616#include <io_data.h>
    1717#include <IODataElement.h>
    18 #include <cvmatrix_descriptor.h>
     18#include <MatrixDescriptor.h>
    1919
    2020class Matrix_impl;
     
    5252  *
    5353  * Construct an io_data representing a matrix. \n
    54   * It uses a cvmatrix_descriptor to get size and elements' names. \n
     54  * It uses a MatrixDescriptor to get size and elements' names. \n
    5555  * Names are used for graphs and logs. \n
    5656  * All values are initialized to 0.
     
    6262  * \param n number of samples
    6363  */
    64   Matrix(const Object *parent, const cvmatrix_descriptor *descriptor,
     64  Matrix(const Object *parent, const MatrixDescriptor *descriptor,
    6565           ScalarType const &elementDataType, std::string name = "",
    6666           uint32_t n = 1);
     
    145145  * \brief Element name
    146146  *
    147   * If Matrix was created without cvmatrix_descriptor, element name is empty.
     147  * If Matrix was created without MatrixDescriptor, element name is empty.
    148148  *
    149149  * \param row element row
  • trunk/lib/FlairCore/src/MatrixDescriptor.cpp

    r317 r318  
    44// %flair:license}
    55//  created:    2014/02/05
    6 //  filename:   cvmatrix_descriptor.cpp
     6//  filename:   MatrixDescriptor.cpp
    77//
    88//  author:     Guillaume Sanahuja
     
    1111//  version:    $Id: $
    1212//
    13 //  purpose:    Class describing cvmatrix elements, for log and graphs purpose
     13//  purpose:    Class describing matrix elements, for log and graphs purpose
    1414//
    1515/*********************************************************************/
    1616
    17 #include "cvmatrix_descriptor.h"
     17#include "MatrixDescriptor.h"
    1818#include "FrameworkManager.h"
    1919
     
    2323namespace core {
    2424
    25 cvmatrix_descriptor::cvmatrix_descriptor(uint32_t rows, uint32_t cols) {
     25MatrixDescriptor::MatrixDescriptor(uint32_t rows, uint32_t cols) {
    2626  this->rows = rows;
    2727  this->cols = cols;
     
    3636}
    3737
    38 cvmatrix_descriptor::~cvmatrix_descriptor() {
     38MatrixDescriptor::~MatrixDescriptor() {
    3939  for (uint32_t i = 0; i < rows * cols; i++) {
    4040    delete element_names[i];
     
    4343}
    4444
    45 void cvmatrix_descriptor::SetElementName(uint32_t row, uint32_t col,
     45void MatrixDescriptor::SetElementName(uint32_t row, uint32_t col,
    4646                                         string name) {
    4747  if (row >= rows || col >= cols) {
     
    5353}
    5454
    55 string cvmatrix_descriptor::ElementName(uint32_t row, uint32_t col) const {
     55string MatrixDescriptor::ElementName(uint32_t row, uint32_t col) const {
    5656  if (row >= rows || col >= cols) {
    5757    getFrameworkManager()->Err("index out of bound (%i,%i), max (%i,%i)\n",
     
    6262}
    6363
    64 uint32_t cvmatrix_descriptor::Rows() const { return rows; }
     64uint32_t MatrixDescriptor::Rows() const { return rows; }
    6565
    66 uint32_t cvmatrix_descriptor::Cols() const { return cols; }
     66uint32_t MatrixDescriptor::Cols() const { return cols; }
    6767
    6868} // end namespace core
  • trunk/lib/FlairCore/src/MatrixDescriptor.h

    r317 r318  
    44// %flair:license}
    55/*!
    6  * \file cvmatrix_descriptor.h
    7  * \brief Class describing cvmatrix elements, for log and graphs purpose
     6 * \file MatrixDescriptor.h
     7 * \brief Class describing matrix elements, for log and graphs purpose
    88 * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
    99 * \date 2014/02/05
     
    1111 */
    1212
    13 #ifndef CVMATRIX_DESCRIPTOR_H
    14 #define CVMATRIX_DESCRIPTOR_H
     13#ifndef MATRIXDESCRIPTOR_H
     14#define MATRIXDESCRIPTOR_H
    1515
    1616#include <string>
     
    1919namespace core {
    2020
    21 /*! \class cvmatrix_descriptor
     21/*! \class MatrixDescriptor
    2222*
    23 * \brief Class describing cvmatrix elements, for log and graphs purpose
     23* \brief Class describing matrix elements, for log and graphs purpose
    2424*
    2525* This class allows to give a name to matrix elements. These names
    2626* will be used in graphs and logs.
    2727*/
    28 class cvmatrix_descriptor {
     28class MatrixDescriptor {
    2929public:
    3030  /*!
     
    3636  * \param cols matrix cols
    3737  */
    38   cvmatrix_descriptor(uint32_t rows, uint32_t cols);
     38  MatrixDescriptor(uint32_t rows, uint32_t cols);
    3939
    4040  /*!
     
    4242  *
    4343  */
    44   ~cvmatrix_descriptor();
     44  ~MatrixDescriptor();
    4545
    4646  /*!
     
    8585} // end namespace flair
    8686
    87 #endif // CVMATRIX_DESCRIPTOR_H
     87#endif // MATRIXDESCRIPTOR_H
  • trunk/lib/FlairCore/src/Matrix_impl.cpp

    r214 r318  
    2727                             int n)
    2828    : elementDataType(_elementDataType) {
    29   descriptor = new cvmatrix_descriptor(rows, cols);
     29  descriptor = new MatrixDescriptor(rows, cols);
    3030  Init(self, n);
    3131}
    3232
    3333Matrix_impl::Matrix_impl(Matrix *self,
    34                              const cvmatrix_descriptor *inDescriptor,
     34                             const MatrixDescriptor *inDescriptor,
    3535                             flair::core::ScalarType const &_elementDataType,
    3636                             int n)
    3737    : elementDataType(_elementDataType) {
    38   descriptor = new cvmatrix_descriptor(inDescriptor->Rows(), inDescriptor->Cols());
     38  descriptor = new MatrixDescriptor(inDescriptor->Rows(), inDescriptor->Cols());
    3939
    4040  for (uint32_t i = 0; i < descriptor->Rows(); i++) {
  • trunk/lib/FlairCore/src/unexported/Matrix_impl.h

    r214 r318  
    2727                flair::core::ScalarType const &elementDataType, int n);
    2828  Matrix_impl(flair::core::Matrix *self,
    29                 const flair::core::cvmatrix_descriptor *descriptor,
     29                const flair::core::MatrixDescriptor *descriptor,
    3030                flair::core::ScalarType const &elementDataType, int n);
    3131  ~Matrix_impl();
    3232
    3333  flair::core::ScalarType const &elementDataType;
    34   flair::core::cvmatrix_descriptor *descriptor;
     34  flair::core::MatrixDescriptor *descriptor;
    3535  void *datas;
    3636  void SetValueNoMutex(uint32_t row, uint32_t col, float value);
  • trunk/lib/FlairFilter/src/ButterworthLowPass_impl.cpp

    r223 r318  
    3939                             " Hz", 0, 10000, 0.1, 2, 1);
    4040
    41   cvmatrix_descriptor *desc = new cvmatrix_descriptor(nbRow, nbCol);
     41  MatrixDescriptor *desc = new MatrixDescriptor(nbRow, nbCol);
    4242  //desc->SetElementName(0, 0, "output");
    4343  output = new Matrix(self, desc, floatType, name);
  • trunk/lib/FlairFilter/src/ControlLaw.cpp

    r214 r318  
    1818#include "ControlLaw.h"
    1919#include <Matrix.h>
    20 #include <cvmatrix_descriptor.h>
     20#include <MatrixDescriptor.h>
    2121#include <DataPlot1D.h>
    2222#include <sstream>
     
    3434    output = new Matrix(this, nb_out, 1, floatType, name);
    3535  } else {
    36     cvmatrix_descriptor *desc = new cvmatrix_descriptor(nb_out, 1);
     36    MatrixDescriptor *desc = new MatrixDescriptor(nb_out, 1);
    3737    for (int i = 0; i < nb_out; i++) {
    3838      std::stringstream ss;
  • trunk/lib/FlairFilter/src/EulerDerivative_impl.cpp

    r272 r318  
    3737  if (init_value != NULL) {
    3838    // init output matrix of same size as init
    39     cvmatrix_descriptor *desc =new cvmatrix_descriptor(init_value->Rows(), init_value->Cols());
     39    MatrixDescriptor *desc =new MatrixDescriptor(init_value->Rows(), init_value->Cols());
    4040
    4141    for (int i = 0; i < init_value->Rows(); i++) {
     
    5353  } else {
    5454    // if NULL, assume dimension 1, and init=0
    55     cvmatrix_descriptor *desc = new cvmatrix_descriptor(1, 1);
     55    MatrixDescriptor *desc = new MatrixDescriptor(1, 1);
    5656    desc->SetElementName(0, 0, "output");
    5757    output = new Matrix(self, desc, floatType, name);
     
    6060 
    6161 
    62   cvmatrix_descriptor *desc = new cvmatrix_descriptor(output->Rows(), output->Cols());
     62  MatrixDescriptor *desc = new MatrixDescriptor(output->Rows(), output->Cols());
    6363  prev_input = new Matrix(self, desc, output->GetDataType().GetElementDataType(), name);
    6464  prev_output = new Matrix(self, desc, output->GetDataType().GetElementDataType(), name);
  • trunk/lib/FlairFilter/src/JoyReference_impl.cpp

    r223 r318  
    4242  input = new Matrix(self, 4, 1, floatType, name);
    4343
    44   cvmatrix_descriptor *desc = new cvmatrix_descriptor(4, 1);
     44  MatrixDescriptor *desc = new MatrixDescriptor(4, 1);
    4545  desc->SetElementName(0, 0, "z");
    4646  ;
  • trunk/lib/FlairFilter/src/LowPassFilter_impl.cpp

    r223 r318  
    3838  if (init_value != NULL) {
    3939    // init output matrix of same size as init
    40     cvmatrix_descriptor *desc =new cvmatrix_descriptor(init_value->Rows(), init_value->Cols());
     40    MatrixDescriptor *desc =new MatrixDescriptor(init_value->Rows(), init_value->Cols());
    4141
    4242    for (int i = 0; i < init_value->Rows(); i++) {
     
    5454  } else {
    5555    // if NULL, assume dimension 1, and init=0
    56     cvmatrix_descriptor *desc = new cvmatrix_descriptor(1, 1);
     56    MatrixDescriptor *desc = new MatrixDescriptor(1, 1);
    5757    desc->SetElementName(0, 0, "output");
    5858    output = new Matrix(self, desc, floatType, name);
  • trunk/lib/FlairFilter/src/PidThrust_impl.cpp

    r223 r318  
    3838  self->input = new Matrix(self, 2, 1, floatType, name);
    3939
    40   cvmatrix_descriptor *desc = new cvmatrix_descriptor(5, 1);
     40  MatrixDescriptor *desc = new MatrixDescriptor(5, 1);
    4141  desc->SetElementName(0, 0, "p");
    4242  desc->SetElementName(1, 0, "i");
  • trunk/lib/FlairFilter/src/Pid_impl.cpp

    r223 r318  
    3636  self->input = new Matrix(self, 2, 1, floatType, name);
    3737
    38   cvmatrix_descriptor *desc = new cvmatrix_descriptor(4, 1);
     38  MatrixDescriptor *desc = new MatrixDescriptor(4, 1);
    3939  desc->SetElementName(0, 0, "p");
    4040  desc->SetElementName(1, 0, "i");
  • trunk/lib/FlairFilter/src/TrajectoryGenerator1D_impl.cpp

    r214 r318  
    6060
    6161  // init matrix
    62   cvmatrix_descriptor *desc = new cvmatrix_descriptor(2, 1);
     62  MatrixDescriptor *desc = new MatrixDescriptor(2, 1);
    6363  desc->SetElementName(0, 0, "pos");
    6464  desc->SetElementName(1, 0, "vel");
  • trunk/lib/FlairFilter/src/TrajectoryGenerator2DCircle_impl.cpp

    r214 r318  
    5151
    5252  // init matrix
    53   cvmatrix_descriptor *desc = new cvmatrix_descriptor(2, 2);
     53  MatrixDescriptor *desc = new MatrixDescriptor(2, 2);
    5454  desc->SetElementName(0, 0, "pos.x");
    5555  desc->SetElementName(0, 1, "pos.y");
  • trunk/lib/FlairFilter/src/X4X8Multiplex_impl.cpp

    r214 r318  
    5050  pas->AddItem("clockwise");
    5151
    52   cvmatrix_descriptor *desc = new cvmatrix_descriptor(nb_mot, 1);
     52  MatrixDescriptor *desc = new MatrixDescriptor(nb_mot, 1);
    5353  for (int i = 0; i < nb_mot; i++) {
    5454    desc->SetElementName(i, 0, MotorName(i));
  • trunk/lib/FlairFilter/src/unexported/NestedSat_impl.h

    r15 r318  
    1818namespace flair {
    1919namespace core {
    20 class cvmatrix;
    2120class io_data;
    2221}
  • trunk/lib/FlairMeta/src/MetaVrpnObject.cpp

    r310 r318  
    4848
    4949void MetaVrpnObject::ConstructorCommon(string name,VrpnClient *client) {
    50   cvmatrix_descriptor *desc = new cvmatrix_descriptor(7, 1);
     50  MatrixDescriptor *desc = new MatrixDescriptor(7, 1);
    5151  for (int i = 0; i < desc->Rows(); i++) {
    5252    desc->SetElementName(i, 0, Output()->Name(i, 0));
     
    5959  delete prev_value;
    6060
    61   desc = new cvmatrix_descriptor(7, 1);
     61  desc = new MatrixDescriptor(7, 1);
    6262  for (int i = 0; i < desc->Rows(); i++) {
    6363    desc->SetElementName(i, 0, "d" + Output()->Name(i, 0));
  • trunk/lib/FlairSensorActuator/src/BlCtrlV2_x4_speed.cpp

    r268 r318  
    122122  input = new Matrix((IODevice *)this, 8, 1, floatType);
    123123
    124   cvmatrix_descriptor *desc = new cvmatrix_descriptor(4, 2);
     124  MatrixDescriptor *desc = new MatrixDescriptor(4, 2);
    125125  desc->SetElementName(0, 0, "avant gauche");
    126126  desc->SetElementName(1, 0, "arriere droite");
  • trunk/lib/FlairSensorActuator/src/Bldc.cpp

    r214 r318  
    4343  pimpl_ = new Bldc_impl(this, layout, name, motors_count);
    4444
    45   cvmatrix_descriptor *desc = new cvmatrix_descriptor(motors_count, 2);
     45  MatrixDescriptor *desc = new MatrixDescriptor(motors_count, 2);
    4646  for (int i = 0; i < motors_count; i++) {
    4747    ostringstream speed, current;
  • trunk/lib/FlairSensorActuator/src/HokuyoUTM30Lx.cpp

    r214 r318  
    3939    : LaserRangeFinder(name), Thread(getFrameworkManager(), name, priority) {
    4040  main_tab = new Tab(getFrameworkManager()->GetTabWidget(), name);
    41   cvmatrix_descriptor *desc = new cvmatrix_descriptor(1081, 1);
     41  MatrixDescriptor *desc = new MatrixDescriptor(1081, 1);
    4242  output = new Matrix((IODevice *)this, desc, SignedIntegerType(16));
    4343  delete desc;
  • trunk/lib/FlairSensorActuator/src/LaserRangeFinder.cpp

    r214 r318  
    3737LaserRangeFinder::LaserRangeFinder(string name)
    3838    : IODevice(getFrameworkManager(), name) {
    39   cvmatrix_descriptor *desc = new cvmatrix_descriptor(360, 1);
     39  MatrixDescriptor *desc = new MatrixDescriptor(360, 1);
    4040  output = new Matrix(this, desc, floatType);
    4141  delete desc;
  • trunk/lib/FlairSensorActuator/src/PressureSensor.cpp

    r216 r318  
    3636  plot_tab = NULL;
    3737
    38   cvmatrix_descriptor *desc = new cvmatrix_descriptor(1, 1);
     38  MatrixDescriptor *desc = new MatrixDescriptor(1, 1);
    3939  desc->SetElementName(0, 0, name);
    4040  output = new Matrix(this, desc, floatType);
  • trunk/lib/FlairSensorActuator/src/RadioReceiver.cpp

    r214 r318  
    3838
    3939  // init matrix
    40   cvmatrix_descriptor *desc = new cvmatrix_descriptor(nb_channels, 1);
     40  MatrixDescriptor *desc = new MatrixDescriptor(nb_channels, 1);
    4141  for (int i = 0; i < nb_channels; i++) {
    4242    ostringstream channel_name;
  • trunk/lib/FlairSensorActuator/src/UsRangeFinder.cpp

    r221 r318  
    3636  plot_tab = NULL;
    3737
    38   cvmatrix_descriptor *desc = new cvmatrix_descriptor(1, 1);
     38  MatrixDescriptor *desc = new MatrixDescriptor(1, 1);
    3939  desc->SetElementName(0, 0, name);
    4040  output = new Matrix(this, desc, floatType);
  • trunk/lib/FlairSensorActuator/src/VrpnObject_impl.cpp

    r309 r318  
    5959 
    6060  // state
    61   cvmatrix_descriptor *desc = new cvmatrix_descriptor(7, 1);
     61  MatrixDescriptor *desc = new MatrixDescriptor(7, 1);
    6262  desc->SetElementName(0, 0, "q0");
    6363  desc->SetElementName(1, 0, "q1");
     
    7070  delete desc;
    7171
    72   desc = new cvmatrix_descriptor(3, 1);
     72  desc = new MatrixDescriptor(3, 1);
    7373  desc->SetElementName(0, 0, "roll");
    7474  desc->SetElementName(1, 0, "pitch");
  • trunk/lib/FlairSimulator/src/Model_impl.cpp

    r218 r318  
    114114  self->state[-2] = self->state[0];
    115115
    116   cvmatrix_descriptor *desc = new cvmatrix_descriptor(19, 1);
     116  MatrixDescriptor *desc = new MatrixDescriptor(19, 1);
    117117  desc->SetElementName(0, 0, "q0");
    118118  desc->SetElementName(1, 0, "q1");
  • trunk/lib/FlairVisionFilter/src/HoughLines.cpp

    r214 r318  
    4444
    4545    //init output matrix of same size as init
    46     cvmatrix_descriptor* desc=new cvmatrix_descriptor(4,1);
     46    MatrixDescriptor* desc=new MatrixDescriptor(4,1);
    4747    desc->SetElementName(0,0,"distance");
    4848    desc->SetElementName(1,0,"orientation rad");
  • trunk/lib/FlairVisionFilter/src/OpticalFlowCompensated.cpp

    r274 r318  
    3636
    3737OpticalFlowCompensated::OpticalFlowCompensated(const OpticalFlow *parent, const Ahrs *ahrs, const LayoutPosition* position, string name) : IODevice(parent, name), ahrs(ahrs), output(NULL) {
    38   cvmatrix_descriptor* desc=new cvmatrix_descriptor(3,2);
     38  MatrixDescriptor* desc=new MatrixDescriptor(3,2);
    3939  desc->SetElementName(0,0,"raw displacement X");
    4040  desc->SetElementName(0,1,"raw displacement Y");
  • trunk/lib/FlairVisionFilter/src/OpticalFlowSpeed.cpp

    r274 r318  
    2929
    3030OpticalFlowSpeed::OpticalFlowSpeed(const IODevice* parent, const LayoutPosition* position,string name) : IODevice(parent,name) {
    31   cvmatrix_descriptor* desc=new cvmatrix_descriptor(2,1);
     31  MatrixDescriptor* desc=new MatrixDescriptor(2,1);
    3232  desc->SetElementName(0,0,"vx");
    3333  desc->SetElementName(1,0,"vy");
Note: See TracChangeset for help on using the changeset viewer.