![]() |
Visual Servoing Platform version 3.7.0
|
#include <vpArray2D.h>
Public Member Functions | |
| vpArray2D () | |
| vpArray2D (const vpArray2D< Type > &A) | |
| vpArray2D (unsigned int r, unsigned int c) | |
| vpArray2D (unsigned int r, unsigned int c, Type val) | |
| vpArray2D (const std::vector< Type > &vec, unsigned int r=0, unsigned int c=0) | |
| vpArray2D (vpArray2D< Type > &&A) noexcept | |
| VP_EXPLICIT | vpArray2D (const std::initializer_list< Type > &list) |
| VP_EXPLICIT | vpArray2D (unsigned int nrows, unsigned int ncols, const std::initializer_list< Type > &list) |
| VP_EXPLICIT | vpArray2D (const std::initializer_list< std::initializer_list< Type > > &lists) |
| virtual | ~vpArray2D () |
Static Public Member Functions | |
| static vpArray2D< Type > | view (const vpArray2D< Type > &A) |
| static vpArray2D< Type > | view (Type *data, unsigned int numRows, unsigned int numCols) |
| static void | view (vpArray2D< Type > &v, Type *data, unsigned int numRows, unsigned int numCols) |
Public Attributes | |
| Type * | data |
Related Symbols | |
(Note that these are not member symbols.) | |
| enum | vpGEMMmethod |
| template<> | |
| bool | operator== (const vpArray2D< double > &A) const |
| template<> | |
| bool | operator== (const vpArray2D< float > &A) const |
| void | vpGEMM (const vpArray2D< double > &A, const vpArray2D< double > &B, const double &alpha, const vpArray2D< double > &C, const double &beta, vpArray2D< double > &D, const unsigned int &ops=0) |
Inherited functionalities from vpArray2D | |
| std::ostream & | operator<< (std::ostream &s, const vpArray2D< Type > &A) |
| unsigned int | getCols () const |
| Type | getMaxValue () const |
| Type | getMinValue () const |
| unsigned int | getRows () const |
| unsigned int | size () const |
| void | resize (unsigned int nrows, unsigned int ncols, bool flagNullify=true, bool recopy_=true) |
| void | reshape (unsigned int nrows, unsigned int ncols) |
| void | insert (const vpArray2D< Type > &A, unsigned int r, unsigned int c) |
| bool | operator== (const vpArray2D< Type > &A) const |
| bool | operator!= (const vpArray2D< Type > &A) const |
| vpArray2D< Type > & | operator= (Type x) |
| vpArray2D< Type > & | operator= (const vpArray2D< Type > &A) |
| vpArray2D< Type > & | operator= (vpArray2D< Type > &&other) noexcept |
| vpArray2D< Type > & | operator= (const std::initializer_list< Type > &list) |
| vpArray2D< Type > & | operator= (const std::initializer_list< std::initializer_list< Type > > &lists) |
| vpArray2D< Type > & | operator= (const nlohmann::json &j)=delete |
| Type * | operator[] (unsigned int i) |
| Type * | operator[] (unsigned int i) const |
| vpArray2D< Type > | hadamard (const vpArray2D< Type > &m) const |
| vpArray2D< Type > | t () const |
Inherited I/O from vpArray2D with Static Public Member Functions | |
| static void | insert (const vpArray2D< Type > &A, const vpArray2D< Type > &B, vpArray2D< Type > &C, unsigned int r, unsigned int c) |
| unsigned int | rowNum |
| unsigned int | colNum |
| Type ** | rowPtrs |
| unsigned int | dsize |
| bool | isMemoryOwner |
| bool | isRowPtrsOwner |
| vpArray2D< Type > | insert (const vpArray2D< Type > &A, const vpArray2D< Type > &B, unsigned int r, unsigned int c) |
| static bool | load (const std::string &filename, vpArray2D< Type > &A, bool binary=false, char *header=nullptr) |
| static bool | loadYAML (const std::string &filename, vpArray2D< Type > &A, char *header=nullptr) |
| static bool | save (const std::string &filename, const vpArray2D< Type > &A, bool binary=false, const char *header="") |
| static bool | saveYAML (const std::string &filename, const vpArray2D< Type > &A, const char *header="") |
| static vpArray2D< Type > | conv2 (const vpArray2D< Type > &M, const vpArray2D< Type > &kernel, const std::string &mode) |
| static void | conv2 (const vpArray2D< Type > &M, const vpArray2D< Type > &kernel, vpArray2D< Type > &res, const std::string &mode) |
| static bool | isFinite (const vpArray2D< double > &A) |
| template<class T> | |
| void | from_json (const nlohmann::json &j, vpArray2D< T > &array) |
| template<class T> | |
| void | to_json (nlohmann::json &j, const vpArray2D< T > &array) |
Implementation of a generic 2D array used as base class for matrices and vectors.
This class implements a 2D array as a template class and all the basic functionalities common to matrices and vectors. More precisely:
The code below shows how to create a 2-by-3 array of doubles, set the element values and access them:
Once build, this previous code produces the following output:
If ViSP is build with c++11 enabled, you can do the same using:
The array could also be initialized using operator=(const std::initializer_list< std::initializer_list< Type > > &)
You can also use reshape() function:
Definition at line 145 of file vpArray2D.h.
|
inline |
Basic constructor of a 2D array. Number of columns and rows are set to zero.
Definition at line 155 of file vpArray2D.h.
References colNum, data, dsize, isMemoryOwner, isRowPtrsOwner, rowNum, and rowPtrs.
Referenced by conv2(), conv2(), from_json, hadamard(), insert(), insert(), insert(), isFinite(), load(), loadYAML(), operator!=(), operator<<, operator=(), operator=(), operator=(), operator=(), operator=(), operator=(), operator==(), save(), saveYAML(), t(), to_json, view(), view(), view(), vpArray2D(), vpArray2D(), vpArray2D(), vpArray2D(), vpArray2D(), vpArray2D(), and vpArray2D().
Copy constructor of a 2D array.
Definition at line 160 of file vpArray2D.h.
References colNum, data, dsize, isMemoryOwner, isRowPtrsOwner, resize(), rowNum, rowPtrs, and vpArray2D().
|
inline |
Constructor that initializes a 2D array with 0.
| r | : Array number of rows. |
| c | : Array number of columns. |
Definition at line 178 of file vpArray2D.h.
References colNum, data, dsize, isMemoryOwner, isRowPtrsOwner, resize(), rowNum, rowPtrs, and vpArray2D().
|
inline |
Constructor that initialize a 2D array with val.
| r | : Array number of rows. |
| c | : Array number of columns. |
| val | : Each element of the array is set to val. |
Definition at line 196 of file vpArray2D.h.
References colNum, data, dsize, isMemoryOwner, isRowPtrsOwner, resize(), rowNum, rowPtrs, and vpArray2D().
|
inline |
Constructor that initialize a 2D array from a std::vector.
| r | : Array number of rows. |
| c | : Array number of columns. |
| vec | : Data used to initialize the 2D array. |
Definition at line 219 of file vpArray2D.h.
References colNum, data, vpException::dimensionError, dsize, isMemoryOwner, isRowPtrsOwner, resize(), rowNum, rowPtrs, and vpArray2D().
Definition at line 261 of file vpArray2D.h.
References colNum, data, dsize, isMemoryOwner, isRowPtrsOwner, rowNum, rowPtrs, and vpArray2D().
|
inline |
Definition at line 278 of file vpArray2D.h.
References data, resize(), and vpArray2D().
|
inline |
Definition at line 284 of file vpArray2D.h.
References colNum, data, dsize, isMemoryOwner, isRowPtrsOwner, resize(), rowNum, and rowPtrs.
|
inline |
Definition at line 297 of file vpArray2D.h.
References resize(), rowNum, rowPtrs, and vpArray2D().
Destructor that deallocate memory.
Definition at line 396 of file vpArray2D.h.
References colNum, data, dsize, isMemoryOwner, isRowPtrsOwner, rowNum, and rowPtrs.
|
static |
Perform a 2D convolution similar to Matlab conv2 function:
.
| M | : First matrix. |
| kernel | : Second matrix. |
| mode | : Convolution mode: "full" (default), "same", "valid". |
Definition at line 1284 of file vpArray2D.h.
References conv2(), and vpArray2D().
Referenced by conv2(), and vpImageFilter::getSobelKernelY().
|
static |
Perform a 2D convolution similar to Matlab conv2 function:
.
| M | : First array. |
| kernel | : Second array. |
| res | : Result. |
| mode | : Convolution mode: "full" (default), "same", "valid". |
Definition at line 1291 of file vpArray2D.h.
References data, getCols(), getRows(), insert(), resize(), and vpArray2D().
|
inline |
Return the number of columns of the 2D array.
Definition at line 423 of file vpArray2D.h.
References colNum.
Referenced by vpMatrix::add2Matrices(), vpMatrix::add2Matrices(), vpMatrix::add2WeightedMatrices(), vpQuadProg::checkDimensions(), vpLinProg::colReduction(), vpMatrix::computeCovarianceMatrix(), vpMatrix::computeCovarianceMatrix(), vpMatrix::computeHLM(), vpMbTracker::computeJTR(), vpRBFeatureTracker::computeJTR(), vpServo::computeProjectionOperators(), vpMbTracker::computeVVSPoseEstimation(), conv2(), vpMatrix::conv2(), vpImageFilter::filter(), vpImageFilter::filter(), vpQuadProg::fromCanonicalCost(), vpRBTracker::getCovariance(), vpImageSimulator::getImage(), vpImageSimulator::getImage(), vpImageFilter::getScharrKernelX(), vpImageFilter::getSobelKernelX(), vpImageFilter::getSobelKernelY(), vpLuminanceDCT::vpMatrixZigZagIndex::getValues(), hadamard(), vpMatrix::hadamard(), vpMatrix::init(), vpSubMatrix::init(), vpCircleHoughTransform::initGradientFilters(), insert(), insert(), vpMatrix::insert(), vpHomography::inverse(), vpLuminanceDCT::inverse(), vpMatrix::inverseByCholeskyLapack(), vpMatrix::juxtaposeMatrices(), vpMatrix::kron(), vpMatrix::kron(), vpLuminancePCA::learn(), vpLuminancePCA::learn(), vpLuminancePCA::learn(), vpMeLine::leastSquare(), vpMeEllipse::leastSquareRobustCircle(), vpMeEllipse::leastSquareRobustEllipse(), vpRBVisualOdometryUtils::levenbergMarquardtKeypoints2D(), vpRBVisualOdometryUtils::levenbergMarquardtKeypoints3D(), vpLuminancePCA::load(), vpMatrix::mult2Matrices(), vpMatrix::mult2Matrices(), vpMatrix::mult2Matrices(), vpMatrix::mult2Matrices(), vpMatrix::mult2Matrices(), vpMatrix::multMatrixVector(), vpColVector::operator*(), vpForceTwistMatrix::operator*(), vpMatrix::operator*(), vpMatrix::operator*(), vpMatrix::operator*(), vpMatrix::operator*(), vpMatrix::operator*(), vpRotationMatrix::operator*(), vpRowVector::operator*(), vpVelocityTwistMatrix::operator*(), vpMatrix::operator+=(), vpRowVector::operator-(), vpMatrix::operator-=(), operator<<, vpColVector::operator=(), vpHomography::operator=(), vpMatrix::operator=(), vpMatrix::operator=(), vpMatrix::operator=(), vpMatrix::operator=(), vpMatrix::operator=(), vpRotationMatrix::operator=(), vpRowVector::operator=(), vpSubColVector::operator=(), vpSubMatrix::operator=(), vpSubMatrix::operator=(), vpSubRowVector::operator=(), vpSubRowVector::operator=(), vpSubRowVector::operator=(), vpMatrix::printSize(), vpPointMap::project(), vpIoTools::readConfigVar(), vpColVector::reshape(), vpRowVector::reshape(), vpLinProg::rowReduction(), save(), saveYAML(), vpLuminanceDCT::vpMatrixZigZagIndex::setValues(), vpQuadProg::solveByProjection(), vpLinProg::solveLP(), vpQuadProg::solveQP(), vpQuadProg::solveSVDorQR(), vpMatrix::stack(), vpMatrix::stack(), vpRowVector::stack(), vpMatrix::stackRows(), vpMatrix::sub2Matrices(), vpMatrix::sub2Matrices(), vpMatrix::svdEigen3(), VISP_NAMESPACE_NAME::visp2eigen(), VISP_NAMESPACE_NAME::visp2eigen(), vpColVector::vpColVector(), vpColVector::vpColVector(), vpRowVector::vpRowVector(), vpRowVector::vpRowVector(), and vpImageTools::warpImage().
| Type vpArray2D< Type >::getMaxValue | ( | ) | const |
Return the array max value.
Definition at line 1237 of file vpArray2D.h.
Referenced by vpRBSilhouetteCCDTracker::display().
| Type vpArray2D< Type >::getMinValue | ( | ) | const |
Return the array min value.
Definition at line 1220 of file vpArray2D.h.
|
inline |
Return the number of rows of the 2D array.
Definition at line 433 of file vpArray2D.h.
References rowNum.
Referenced by vpMatrix::add2Matrices(), vpMatrix::add2Matrices(), vpMatrix::add2WeightedMatrices(), vpLinProg::allClose(), vpQuadProg::checkDimensions(), vpLinProg::colReduction(), vpPointMap::compute3DErrorAndJacobian(), vpMatrix::computeCovarianceMatrix(), vpServo::computeError(), vpRBSilhouetteCCDTracker::computeErrorAndInteractionMatrix(), vpMatrix::computeHLM(), vpRBVisualOdometryUtils::computeIndicesObjectAndEnvironment(), vpMbTracker::computeJTR(), vpRBFeatureTracker::computeJTR(), vpPtu46::computeMGD(), vpPointMap::computeReprojectionErrorAndJacobian(), vpMbEdgeKltTracker::computeVVS(), vpMbTracker::computeVVSCheckLevenbergMarquardt(), vpMbEdgeTracker::computeVVSFirstPhasePoseEstimation(), vpMbTracker::computeVVSPoseEstimation(), conv2(), vpMatrix::conv2(), vpMatrix::createDiagonalMatrix(), vpColVector::crossProd(), vpDot2::defineDots(), vpMatrix::diag(), vpColVector::dotProd(), vpGenericFeature::error(), vpImageFilter::filter(), vpImageFilter::filter(), vpImageFilter::filter(), vpQuadProg::fromCanonicalCost(), vpBiclops::get_eJe(), vpPtu46::get_eJe(), vpBiclops::get_fJe(), vpPtu46::get_fJe(), vpBiclops::get_fMe(), vpGenericFeature::get_s(), vpRBTracker::getCovariance(), vpImageSimulator::getImage(), vpImageSimulator::getImage(), vpAfma6::getInverseKinematics(), vpViper::getInverseKinematicsWrist(), vpPointMap::getOutliers(), vpPointMap::getPoints(), vpImageFilter::getScharrKernelX(), vpImageFilter::getSobelKernelX(), vpImageFilter::getSobelKernelY(), vpLuminanceDCT::vpMatrixZigZagIndex::getValues(), vpPointMap::getVisiblePoints(), hadamard(), vpMatrix::hadamard(), vpLuminancePCA::init(), vpMatrix::init(), vpSubMatrix::init(), vpUnscentedKalman::init(), vpCircleHoughTransform::initGradientFilters(), vpImageTools::inRange(), vpImageTools::inRange(), insert(), insert(), vpMatrix::insert(), vpHomography::inverse(), vpLuminanceDCT::inverse(), vpMatrix::inverseByCholeskyLapack(), vpMatrix::inverseByQRLapack(), vpMatrix::juxtaposeMatrices(), vpMatrix::kernel(), vpMatrix::kron(), vpMatrix::kron(), vpLuminancePCA::learn(), vpRBVisualOdometryUtils::levenbergMarquardtKeypoints2D(), vpRBVisualOdometryUtils::levenbergMarquardtKeypoints3D(), vpRobust::MEstimator(), vpRobust::MEstimator(), vpMatrix::mult2Matrices(), vpMatrix::mult2Matrices(), vpMatrix::mult2Matrices(), vpMatrix::mult2Matrices(), vpMatrix::mult2Matrices(), FastMat33< T >::multiply(), vpMatrix::multMatrixVector(), vpRBConvergenceADDMetric::operator()(), vpRBConvergenceReprojectionMetric::operator()(), vpColVector::operator*(), vpForceTwistMatrix::operator*(), vpForceTwistMatrix::operator*(), vpMatrix::operator*(), vpMatrix::operator*(), vpMatrix::operator*(), vpMatrix::operator*(), vpMatrix::operator*(), vpRotationMatrix::operator*(), vpRowVector::operator*(), vpVelocityTwistMatrix::operator*(), vpMatrix::operator+=(), vpColVector::operator-(), vpMatrix::operator-=(), operator<<, vpColVector::operator=(), vpColVector::operator=(), vpColVector::operator=(), vpHomography::operator=(), vpMatrix::operator=(), vpMatrix::operator=(), vpMatrix::operator=(), vpMatrix::operator=(), vpMatrix::operator=(), vpRotationMatrix::operator=(), vpRowVector::operator=(), vpSubColVector::operator=(), vpSubColVector::operator=(), vpSubColVector::operator=(), vpSubColVector::operator=(), vpSubColVector::operator=(), vpSubMatrix::operator=(), vpSubMatrix::operator=(), vpSubRowVector::operator=(), vpPlot::plot(), vpPlot::plot(), vpPlot::plot(), vpPlot::plot(), vpPlot::plot(), vpMatrix::printSize(), vpPointMap::project(), vpPointMap::project(), vpPointMap::project(), vpIoTools::readConfigVar(), vpColVector::reshape(), vpRowVector::reshape(), vpLinProg::rowReduction(), vpRBConvergenceMetric::sampleObject(), save(), saveYAML(), vpPointMap::selectValidNewCandidates(), vpGenericFeature::set_s(), vpQuadProg::setEqualityConstraint(), vpGenericFeature::setError(), vpGenericFeature::setInteractionMatrix(), vpSimulatorAfma6::setJointLimit(), vpSimulatorViper850::setJointLimit(), vpLuminanceDCT::vpMatrixZigZagIndex::setValues(), vpRobotBiclops::setVelocity(), vpRobotPololuPtu::setVelocity(), vpSimulatorAfma6::setVelocity(), vpSimulatorViper850::setVelocity(), vpLine::setWorldCoordinates(), vpLine::setWorldCoordinates(), vpLinProg::simplex(), vpRobust::simultMEstimator(), vpQuadProg::solveByProjection(), vpLinProg::solveLP(), vpQuadProg::solveQP(), vpQuadProg::solveQPi(), vpQuadProg::solveSVDorQR(), vpColVector::stack(), vpMatrix::stack(), vpMatrix::stack(), vpMatrix::stack(), vpMatrix::stackRows(), vpMatrix::sub2Matrices(), vpMatrix::sub2Matrices(), vpMatrix::svdEigen3(), vpRBTracker::track(), vpPointMap::updatePoints(), VISP_NAMESPACE_NAME::visp2eigen(), VISP_NAMESPACE_NAME::visp2eigen(), vpColVector::vpColVector(), vpRowVector::vpRowVector(), and vpImageTools::warpImage().
| vpArray2D< Type > vpArray2D< Type >::hadamard | ( | const vpArray2D< Type > & | m | ) | const |
Compute the Hadamard product (element wise matrix multiplication).
| m | : Second matrix; |
Definition at line 1257 of file vpArray2D.h.
References colNum, data, vpException::dimensionError, dsize, getCols(), getRows(), resize(), rowNum, and vpArray2D().
| vpArray2D< Type > vpArray2D< Type >::insert | ( | const vpArray2D< Type > & | A, |
| const vpArray2D< Type > & | B, | ||
| unsigned int | r, | ||
| unsigned int | c ) |
Insert array B in array A at the given position.
| A | : Main array. |
| B | : Array to insert. |
| r | : Index of the row where to add the array. |
| c | : Index of the column where to add the array. |
Definition at line 1368 of file vpArray2D.h.
References insert(), and vpArray2D().
|
inline |
Insert array A at the given position in the current array.
| A | : The array to insert. |
| r | : The index of the row to begin to insert data. |
| c | : The index of the column to begin to insert data. |
Definition at line 586 of file vpArray2D.h.
References colNum, data, vpException::dimensionError, getCols(), getRows(), rowNum, size(), and vpArray2D().
Referenced by conv2(), insert(), vpMatrix::insert(), and vpMatrix::insert().
Definition at line 1188 of file vpArray2D.h.
References data, vpMath::isFinite(), size(), and vpArray2D().
Referenced by vpRBTracker::track().
|
inlinestatic |
Load a matrix from a file.
| filename | : Absolute file name. |
| A | : Array to be loaded |
| binary | : If true the matrix is loaded from a binary file, else from a text file. |
| header | : Header of the file is loaded in this parameter. |
Definition at line 760 of file vpArray2D.h.
References vpException::badValue, resize(), and vpArray2D().
Referenced by vpMatrix::loadMatrix().
|
inlinestatic |
Load an array from a YAML-formatted file.
| filename | : absolute file name. |
| A | : array to be loaded from the file. |
| header | : header of the file is loaded in this parameter. |
Definition at line 874 of file vpArray2D.h.
References resize(), and vpArray2D().
Referenced by vpMatrix::loadMatrixYAML().
| bool operator!= | ( | const vpArray2D< Type > & | A | ) | const |
Not equal to comparison operator of a 2D array.
Definition at line 1458 of file vpArray2D.h.
References vpArray2D().
|
delete |
References vpArray2D().
|
inline |
Definition at line 672 of file vpArray2D.h.
References resize(), rowNum, rowPtrs, and vpArray2D().
|
inline |
Definition at line 662 of file vpArray2D.h.
References data, dsize, resize(), and vpArray2D().
|
inline |
Copy operator of a 2D array.
Definition at line 624 of file vpArray2D.h.
References colNum, data, resize(), rowNum, and vpArray2D().
Set all the elements of the array to x.
Definition at line 615 of file vpArray2D.h.
References data, dsize, and vpArray2D().
Referenced by vpColVector::operator=(), vpMatrix::operator=(), and vpRowVector::operator=().
|
inlinenoexcept |
Definition at line 634 of file vpArray2D.h.
References colNum, data, dsize, isMemoryOwner, isRowPtrsOwner, rowNum, rowPtrs, and vpArray2D().
Equal to comparison operator of a 2D array.
Definition at line 1401 of file vpArray2D.h.
References colNum, data, rowNum, size(), and vpArray2D().
|
inline |
|
inline |
|
inline |
Definition at line 545 of file vpArray2D.h.
References colNum, data, vpException::dimensionError, dsize, resize(), rowNum, and rowPtrs.
|
inline |
Set the size of the array and initialize all the values to zero.
| nrows | : number of rows. |
| ncols | : number of column. |
| flagNullify | : if true, then the array is re-initialized to 0 after resize. If false, the initial values from the common part of the array (common part between old and new version of the array) are kept. Default value is true. |
| recopy_ | : if true, will perform an explicit recopy of the old data. |
Definition at line 448 of file vpArray2D.h.
References vpException::badValue, colNum, dsize, isMemoryOwner, vpException::memoryAllocationError, rowNum, and rowPtrs.
Referenced by vpMatrix::AAt(), vpMatrix::add2Matrices(), vpMatrix::add2WeightedMatrices(), vpMatrix::AtA(), vpLinProg::colReduction(), vpPointMap::compute3DErrorAndJacobian(), vpServo::computeProjectionOperators(), vpPointMap::computeReprojectionErrorAndJacobian(), vpMbEdgeKltTracker::computeVVS(), vpMatrix::cond(), conv2(), vpMatrix::conv2(), vpMatrix::createDiagonalMatrix(), vpHomography::DLT(), VISP_NAMESPACE_NAME::eigen2visp(), vpMatrix::eigenValues(), vpMatrix::expm(), vpMatrix::extract(), vpAfma6::get_eJe(), vpBiclops::get_eJe(), vpPtu46::get_eJe(), vpRobotFranka::get_eJe(), vpRobotFranka::get_eJe(), vpAfma6::get_fJe(), vpBiclops::get_fJe(), vpPtu46::get_fJe(), vpRobotFranka::get_fJe(), vpRobotFranka::get_fJe(), vpViper::get_fJw(), vpRobotFranka::getMass(), vpPointMap::getPoints(), hadamard(), vpMatrix::hadamard(), vpLuminanceMapping::imageAsMatrix(), vpImageTools::initUndistortMap(), insert(), vpFeatureDepth::interaction(), vpFeatureEllipse::interaction(), vpFeatureLuminance::interaction(), vpFeatureLuminanceMapping::interaction(), vpFeaturePoint3D::interaction(), vpFeaturePoint::interaction(), vpFeaturePointPolar::interaction(), vpFeatureSegment::interaction(), vpFeatureThetaU::interaction(), vpFeatureTranslation::interaction(), vpFeatureVanishingPoint::interaction(), vpGenericFeature::interaction(), vpLuminanceDCT::interaction(), vpMatrix::inverseByLU(), vpMatrix::inverseByQRLapack(), vpMatrix::inverseTriangular(), vpMatrix::juxtaposeMatrices(), vpMatrix::kernel(), vpMatrix::kron(), vpMatrix::kron(), vpLuminancePCA::learn(), vpLuminancePCA::learn(), load(), loadYAML(), vpMatrix::mult2Matrices(), vpMatrix::mult2Matrices(), vpMatrix::mult2Matrices(), FastMat33< T >::multiply(), vpMatrix::negateMatrix(), vpMatrix::nullSpace(), vpMatrix::nullSpace(), vpMatrix::operator*(), vpMatrix::operator*(), vpMatrix::operator*(), vpMatrix::operator*(), vpMatrix::operator*(), vpMatrix::operator/(), operator=(), operator=(), operator=(), vpRotationVector::operator=(), vpPose::poseVirtualVSrobust(), vpPointMap::project(), vpPointMap::project(), vpPointMap::project(), vpPointMap::project(), vpIoTools::readConfigVar(), reshape(), vpColVector::reshape(), vpRowVector::reshape(), vpColVector::resize(), vpColVector::resize(), vpRowVector::resize(), vpRowVector::resize(), vpLinProg::rowReduction(), vpPointMap::selectValidNewCandidates(), vpColVector::skew(), vpTranslationVector::skew(), vpLinProg::solveLP(), vpQuadProg::solveQPi(), vpMatrix::stack(), vpMatrix::sub2Matrices(), vpMatrix::svdEigen3(), vpMatrix::svdLapack(), vpMatrix::svdOpenCV(), vpMatrix::transpose(), vpArray2D(), vpArray2D(), vpArray2D(), vpArray2D(), vpArray2D(), vpArray2D(), and vpArray2D().
|
inlinestatic |
Save a matrix to a file.
| filename | : Absolute file name. |
| A | : Array to be saved. |
| binary | : If true the matrix is saved in a binary file, else a text file. |
| header | : Optional line that will be saved at the beginning of the file. |
Warning : If you save the matrix as in a text file the precision is less than if you save it in a binary file.
Definition at line 965 of file vpArray2D.h.
References getCols(), getRows(), and vpArray2D().
Referenced by gen_java.JavaWrapperGenerator::finalize(), gen_java.JavaWrapperGenerator::gen(), and vpMatrix::saveMatrix().
|
inlinestatic |
Save an array in a YAML-formatted file.
| filename | : absolute file name. |
| A | : array to be saved in the file. |
| header | : optional lines that will be saved at the beginning of the file. Should be YAML-formatted and will adapt to the indentation if any. |
Here is an example of outputs.
Content of matrix.yml:
Content of matrixIndent.yml:
Definition at line 1061 of file vpArray2D.h.
References getCols(), getRows(), and vpArray2D().
Referenced by vpMatrix::saveMatrixYAML().
|
inline |
Return the number of elements of the 2D array.
Definition at line 435 of file vpArray2D.h.
References colNum, and rowNum.
Referenced by vpVirtuose::addForce(), vpQuaternionVector::buildFrom(), vpRxyzVector::buildFrom(), vpRzyxVector::buildFrom(), vpRzyzVector::buildFrom(), vpColVector::dotProd(), vpMbtFaceDepthNormal::estimatePlaneEquationSVD(), vpRobotPololuPtu::get_eJe(), vpRobotFranka::get_fJe(), vpRobotPololuPtu::get_fJe(), vpRobotFranka::get_fMe(), vpRobotUniversalRobots::get_fMe(), vpForceTorqueAtiSensor::getForceTorque(), vpParticleFilter< MeasurementsType >::init(), vpParticleFilter< MeasurementsType >::init(), vpImageTools::inRange(), insert(), vpMatrix::insert(), isFinite(), vpMath::lookAt(), vpMarkersMeasurements::measureWithNoise(), vpHomography::operator*(), operator<<, vpQuaternionVector::operator=(), vpRxyzVector::operator=(), vpRzyxVector::operator=(), vpRzyzVector::operator=(), vpTranslationVector::operator=(), operator==(), vpArray2D< double >::operator==(), vpArray2D< double >::operator==(), vpPlot::plot(), vpCameraParameters::printParameters(), vpRobot::saturateVelocities(), vpServo::secondaryTaskJointLimitAvoidance(), vpImageFilter::sepFilter(), vpVirtuose::setArticularForce(), vpVirtuose::setArticularPosition(), vpVirtuose::setArticularVelocity(), vpServo::setCameraDoF(), vpVirtuose::setForce(), vpRobotFranka::setForceTorque(), vpRobotKinova::setJointVelocity(), vpRobotFlirPtu::setPanPosLimits(), vpQbSoftHand::setPosition(), vpReflexTakktile2::setPosition(), vpRobotFlirPtu::setPosition(), vpRobotKinova::setPosition(), vpRobotPololuPtu::setPosition(), vpRobotUniversalRobots::setPosition(), vpReflexTakktile2::setPositioningVelocity(), vpRobotFlirPtu::setTiltPosLimits(), vpLuminanceDCT::vpMatrixZigZagIndex::setValues(), vpRobotBebop2::setVelocity(), vpRobotFlirPtu::setVelocity(), vpRobotFranka::setVelocity(), vpRobotKinova::setVelocity(), vpRobotPioneer::setVelocity(), vpRobotPololuPtu::setVelocity(), vpRobotTemplate::setVelocity(), vpVirtuose::setVelocity(), vpReflexTakktile2::setVelocityUntilAnyContact(), vpReflexTakktile2::setVelocityUntilEachContact(), vpPoint::setWorldCoordinates(), vpUnscentedKalman::simpleMean(), vpMatrix::stack(), vpMatrix::stack(), vpUnscentedKalman::update(), VISP_NAMESPACE_NAME::visp2eigen(), VISP_NAMESPACE_NAME::visp2eigen(), vpPanda3DPointLight::vpPanda3DPointLight(), and vpParticleFilter< MeasurementsType >::weightedMean().
Compute the transpose of the array.
Definition at line 1273 of file vpArray2D.h.
References colNum, rowNum, and vpArray2D().
Referenced by vpImageFilter::getScharrKernelX(), and vpImageFilter::getSobelKernelX().
|
inlinestatic |
Creates a view of the Matrix A. A view shares the same underlying memory as the original array. It can be written into, modifying the original data. However, the array cannot be resized.
When you use this method, it is your responsibility to ensure that the lifespan of the view does not exceed the lifespan of the original array.
| A | the array to view |
Definition at line 324 of file vpArray2D.h.
References colNum, data, dsize, rowNum, rowPtrs, and vpArray2D().
Referenced by view(), vpColVector::view(), vpColVector::view(), vpMatrix::view(), vpMatrix::view(), and vpRowVector::view().
|
inlinestatic |
Create an array view of a raw data pointer. This data is not owned by the resulting array and should be freed after the array is destroyed (not before).
| data | Pointer to the raw data |
| numRows | Number of rows |
| numCols | Number of columns |
Definition at line 346 of file vpArray2D.h.
References data, view(), and vpArray2D().
|
inlinestatic |
Create an array view of a raw data pointer. After this function has been called, the array data can be modified through the view v. This data is not owned by the resulting array and should be freed after the array is destroyed (not before).
| v | The resulting view array |
| data | Pointer to the raw data |
| numRows | Number of rows |
| numCols | Number of columns |
Definition at line 363 of file vpArray2D.h.
References data, and vpArray2D().
|
friend |
References vpArray2D().
|
Insert array B in array A at the given position.
| A | : Main array. |
| B | : Array to insert. |
| C | : Result array. |
| r | : Index of the row where to insert array B. |
| c | : Index of the column where to insert array B. |
Definition at line 1377 of file vpArray2D.h.
References vpException::dimensionError, getCols(), getRows(), resize(), and vpArray2D().
|
friend |
Writes the given array to the output stream and returns a reference to the output stream.
Definition at line 705 of file vpArray2D.h.
References data, getCols(), getRows(), size(), and vpArray2D().
|
Definition at line 1420 of file vpArray2D.h.
|
Definition at line 1439 of file vpArray2D.h.
|
friend |
References vpArray2D().
|
This function performs generalized matrix multiplication: D = alpha*op(A)*op(B) + beta*op(C), where op(X) is X or X^T. Operation on A, B and C matrices is described by enumeration vpGEMMmethod().
For example, to compute D = alpha*A^T*B^T+beta*C we need to call :
If C is not used, vpGEMM must be called using an empty array null. Thus to compute D = alpha*A^T*B, we have to call:
| vpException::incorrectMatrixSizeError | if the sizes of the matrices do not allow the operations. |
| A | : An array that could be a vpMatrix. |
| B | : An array that could be a vpMatrix. |
| alpha | : A scalar. |
| C | : An array that could be a vpMatrix. |
| beta | : A scalar. |
| D | : The resulting array that could be a vpMatrix. |
| ops | : A scalar describing operation applied on the matrices. Possible values are the one defined in vpGEMMmethod(): VP_GEMM_A_T, VP_GEMM_B_T, VP_GEMM_C_T. |
|
Enumeration of the operations applied on matrices in vpGEMM() function.
Operations are :
|
protected |
Number of columns in the array.
Definition at line 1203 of file vpArray2D.h.
Referenced by vpMatrix::AAt(), vpMatrix::add2Matrices(), vpMatrix::add2Matrices(), vpMatrix::add2WeightedMatrices(), vpMatrix::AtA(), getCols(), hadamard(), insert(), vpMatrix::insert(), vpMatrix::inverseByQRLapack(), vpMatrix::inverseTriangular(), vpMatrix::mult2Matrices(), vpMatrix::mult2Matrices(), vpMatrix::mult2Matrices(), vpMatrix::multMatrixVector(), vpMatrix::negateMatrix(), vpMatrix::operator*(), vpMatrix::operator*(), operator=(), operator=(), operator==(), vpArray2D< double >::operator==(), vpArray2D< double >::operator==(), reshape(), resize(), size(), vpMatrix::stackColumns(), vpMatrix::sub2Matrices(), vpMatrix::sub2Matrices(), t(), view(), vpArray2D(), vpArray2D(), vpArray2D(), vpArray2D(), vpArray2D(), vpArray2D(), vpArray2D(), vpMatrix::vpMatrix(), and ~vpArray2D().
| Type* vpArray2D< Type >::data |
Address of the first element of the data array.
Definition at line 149 of file vpArray2D.h.
Referenced by vpMatrix::AAt(), vpMatrix::AtA(), vpMbTracker::computeJTR(), vpRBFeatureTracker::computeJTR(), conv2(), vpMatrix::conv2(), vpMatrix::detByLULapack(), vpColVector::dotProd(), VISP_NAMESPACE_NAME::eigen2visp(), VISP_NAMESPACE_NAME::eigen2visp(), vpMatrix::eigenValues(), vpMatrix::eigenValues(), vpMatrix::expm(), vpRBProbabilistic3DDriftDetector::vpStored3DSurfaceColorPoint::fastProjection(), visp.apps.visp_python_apriltag_detection.DetectionsLogger::finalize_logging(), vpRobotViper650::getForceTorque(), vpRobotViper650::getForceTorque(), vpRobotViper850::getForceTorque(), vpRobotViper850::getForceTorque(), getMaxValue(), getMinValue(), vpRobotViper650::getPosition(), vpRobotViper850::getPosition(), vpImageFilter::getScharrKernelX(), vpImageFilter::getSobelKernelX(), vpImageFilter::getSobelKernelY(), vpRobotViper650::getVelocity(), vpRobotViper850::getVelocity(), hadamard(), vpColVector::hadamard(), vpMatrix::hadamard(), vpRowVector::hadamard(), vpSubMatrix::init(), vpTemplateTrackerMIESM::initHessienDesired(), insert(), vpMatrix::insert(), vpMatrix::inverseByCholeskyLapack(), vpMatrix::inverseByCholeskyOpenCV(), vpMatrix::inverseByLUEigen3(), vpMatrix::inverseByLULapack(), vpMatrix::inverseByLUOpenCV(), vpMatrix::inverseByQRLapack(), vpMatrix::inverseTriangular(), isFinite(), visp.apps.visp_python_apriltag_detection.DetectionsLogger::log_frame(), vpMatrix::mult2Matrices(), vpMatrix::mult2Matrices(), vpMatrix::mult2Matrices(), vpMatrix::mult2Matrices(), vpMatrix::multMatrixVector(), vpHomography::operator*(), vpMatrix::operator*(), vpMatrix::operator*(), vpTranslationVector::operator*(), vpColVector::operator-(), vpRowVector::operator-(), vpTranslationVector::operator-(), vpHomography::operator/(), vpTranslationVector::operator/(), operator<<, operator=(), operator=(), operator=(), operator=(), vpColVector::operator=(), vpColVector::operator=(), vpColVector::operator=(), vpMatrix::operator=(), vpMatrix::operator=(), vpMatrix::operator=(), vpMatrix::operator=(), vpMatrix::operator=(), vpRowVector::operator=(), vpSubColVector::operator=(), vpSubColVector::operator=(), vpTranslationVector::operator=(), vpTranslationVector::operator=(), operator==(), vpArray2D< double >::operator==(), vpArray2D< double >::operator==(), vpImageTools::remap(), reshape(), vpHomography::robust(), vpRobotViper650::setPosition(), vpRobotViper850::setPosition(), vpRobotAfma6::setVelocity(), vpRobotViper650::setVelocity(), vpRobotViper850::setVelocity(), vpMatrix::stack(), vpMatrix::stack(), vpMatrix::stack(), vpMatrix::stack(), vpMatrix::stackColumns(), vpMatrix::stackRows(), vpMatrix::svdEigen3(), vpMatrix::svdLapack(), vpMatrix::svdOpenCV(), vpTemplateTrackerMIESM::trackNoPyr(), vpMatrix::transpose(), view(), view(), view(), VISP_NAMESPACE_NAME::visp2eigen(), VISP_NAMESPACE_NAME::visp2eigen(), VISP_NAMESPACE_NAME::visp2eigen(), VISP_NAMESPACE_NAME::visp2eigen(), vpArray2D(), vpArray2D(), vpArray2D(), vpArray2D(), vpArray2D(), vpArray2D(), vpArray2D(), vpArray2D(), and ~vpArray2D().
|
protected |
Current array size (rowNum * colNum).
Definition at line 1207 of file vpArray2D.h.
Referenced by getMaxValue(), getMinValue(), hadamard(), operator=(), operator=(), operator=(), reshape(), resize(), view(), vpArray2D(), vpArray2D(), vpArray2D(), vpArray2D(), vpArray2D(), vpArray2D(), vpArray2D(), and ~vpArray2D().
|
protected |
Whether this array owns the memory it points to.
Definition at line 1209 of file vpArray2D.h.
Referenced by operator=(), resize(), vpArray2D(), vpArray2D(), vpArray2D(), vpArray2D(), vpArray2D(), vpArray2D(), vpArray2D(), and ~vpArray2D().
|
protected |
Whether this array owns the row pointers.
Definition at line 1211 of file vpArray2D.h.
Referenced by operator=(), vpArray2D(), vpArray2D(), vpArray2D(), vpArray2D(), vpArray2D(), vpArray2D(), vpArray2D(), and ~vpArray2D().
|
protected |
Number of rows in the array.
Definition at line 1201 of file vpArray2D.h.
Referenced by vpMatrix::AAt(), vpMatrix::add2Matrices(), vpMatrix::add2Matrices(), vpMatrix::add2WeightedMatrices(), vpMatrix::AtA(), getRows(), hadamard(), insert(), vpMatrix::inverseByQRLapack(), vpMatrix::inverseTriangular(), vpMatrix::mult2Matrices(), vpMatrix::mult2Matrices(), vpMatrix::multMatrixVector(), vpMatrix::negateMatrix(), operator=(), operator=(), operator=(), vpTranslationVector::operator=(), operator==(), vpArray2D< double >::operator==(), vpArray2D< double >::operator==(), reshape(), resize(), size(), vpMatrix::stackColumns(), vpMatrix::sub2Matrices(), vpMatrix::sub2Matrices(), t(), view(), vpArray2D(), vpArray2D(), vpArray2D(), vpArray2D(), vpArray2D(), vpArray2D(), vpArray2D(), vpArray2D(), vpMatrix::vpMatrix(), and ~vpArray2D().
|
protected |
Address of the first element of each rows.
Definition at line 1205 of file vpArray2D.h.
Referenced by vpMatrix::add2Matrices(), vpMatrix::add2Matrices(), vpMatrix::add2WeightedMatrices(), vpMatrix::mult2Matrices(), vpMatrix::mult2Matrices(), vpMatrix::mult2Matrices(), vpMatrix::mult2Matrices(), vpMatrix::mult2Matrices(), vpMatrix::multMatrixVector(), vpMatrix::negateMatrix(), vpForceTwistMatrix::operator*(), vpVelocityTwistMatrix::operator*(), vpMatrix::operator+=(), vpMatrix::operator-=(), operator=(), operator=(), vpForceTwistMatrix::operator=(), vpHomogeneousMatrix::operator=(), vpSubMatrix::operator=(), vpVelocityTwistMatrix::operator=(), operator[](), operator[](), reshape(), resize(), vpMatrix::sub2Matrices(), vpMatrix::sub2Matrices(), view(), vpArray2D(), vpArray2D(), vpArray2D(), vpArray2D(), vpArray2D(), vpArray2D(), vpArray2D(), vpArray2D(), and ~vpArray2D().