now all Matrix_() removed
parent
afdce9cd80
commit
ad0662a860
|
@ -36,38 +36,6 @@ using namespace std;
|
||||||
|
|
||||||
namespace gtsam {
|
namespace gtsam {
|
||||||
|
|
||||||
/* ************************************************************************* */
|
|
||||||
Matrix Matrix_( size_t m, size_t n, const double* const data) {
|
|
||||||
MatrixRowMajor A(m,n);
|
|
||||||
copy(data, data+m*n, A.data());
|
|
||||||
return Matrix(A);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ************************************************************************* */
|
|
||||||
Matrix Matrix_( size_t m, size_t n, const Vector& v)
|
|
||||||
{
|
|
||||||
Matrix A(m,n);
|
|
||||||
// column-wise copy
|
|
||||||
for( size_t j = 0, k=0 ; j < n ; j++)
|
|
||||||
for( size_t i = 0; i < m ; i++,k++)
|
|
||||||
A(i,j) = v(k);
|
|
||||||
return A;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ************************************************************************* */
|
|
||||||
Matrix Matrix_(size_t m, size_t n, ...) {
|
|
||||||
Matrix A(m,n);
|
|
||||||
va_list ap;
|
|
||||||
va_start(ap, n);
|
|
||||||
for( size_t i = 0 ; i < m ; i++)
|
|
||||||
for( size_t j = 0 ; j < n ; j++) {
|
|
||||||
double value = va_arg(ap, double);
|
|
||||||
A(i,j) = value;
|
|
||||||
}
|
|
||||||
va_end(ap);
|
|
||||||
return A;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ************************************************************************* */
|
/* ************************************************************************* */
|
||||||
Matrix zeros( size_t m, size_t n ) {
|
Matrix zeros( size_t m, size_t n ) {
|
||||||
return Matrix::Zero(m,n);
|
return Matrix::Zero(m,n);
|
||||||
|
|
|
@ -45,27 +45,6 @@ typedef Eigen::Matrix<double,6,6> Matrix6;
|
||||||
typedef Eigen::Block<Matrix> SubMatrix;
|
typedef Eigen::Block<Matrix> SubMatrix;
|
||||||
typedef Eigen::Block<const Matrix> ConstSubMatrix;
|
typedef Eigen::Block<const Matrix> ConstSubMatrix;
|
||||||
|
|
||||||
/**
|
|
||||||
* constructor with size and initial data, row order !
|
|
||||||
*/
|
|
||||||
GTSAM_EXPORT Matrix Matrix_(size_t m, size_t n, const double* const data);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* constructor with size and vector data, column order !!!
|
|
||||||
*/
|
|
||||||
GTSAM_EXPORT Matrix Matrix_(size_t m, size_t n, const Vector& v);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* constructor from Vector yielding v.size()*1 vector
|
|
||||||
*/
|
|
||||||
inline Matrix Matrix_(const Vector& v) { return Matrix_(v.size(),1,v);}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* nice constructor, dangerous as number of arguments must be exactly right
|
|
||||||
* and you have to pass doubles !!! always use 0.0 never 0
|
|
||||||
*/
|
|
||||||
GTSAM_EXPORT Matrix Matrix_(size_t m, size_t n, ...);
|
|
||||||
|
|
||||||
// Matlab-like syntax
|
// Matlab-like syntax
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue