Go to the documentation of this file.
44 #define GTSAM_MAKE_MATRIX_DEFS(N) \
45 using Matrix##N = Eigen::Matrix<double, N, N>; \
46 using Matrix1##N = Eigen::Matrix<double, 1, N>; \
47 using Matrix2##N = Eigen::Matrix<double, 2, N>; \
48 using Matrix3##N = Eigen::Matrix<double, 3, N>; \
49 using Matrix4##N = Eigen::Matrix<double, 4, N>; \
50 using Matrix5##N = Eigen::Matrix<double, 5, N>; \
51 using Matrix6##N = Eigen::Matrix<double, 6, N>; \
52 using Matrix7##N = Eigen::Matrix<double, 7, N>; \
53 using Matrix8##N = Eigen::Matrix<double, 8, N>; \
54 using Matrix9##N = Eigen::Matrix<double, 9, N>; \
55 static const Eigen::MatrixBase<Matrix##N>::IdentityReturnType I_##N##x##N = Matrix##N::Identity(); \
56 static const Eigen::MatrixBase<Matrix##N>::ConstantReturnType Z_##N##x##N = Matrix##N::Zero();
79 template <class MATRIX>
82 const size_t n1 =
A.cols(),
m1 =
A.rows();
83 const size_t n2 =
B.cols(),
m2 =
B.rows();
87 for(
size_t i=0;
i<
m1;
i++)
88 for(
size_t j=0;
j<
n1;
j++) {
123 GTSAM_EXPORT
bool assert_equal(
const std::list<Matrix>& As,
const std::list<Matrix>& Bs,
double tol = 1
e-9);
142 template<
class MATRIX>
143 inline MATRIX
prod(
const MATRIX&
A,
const MATRIX&
B) {
156 GTSAM_EXPORT
void print(
const Matrix&
A,
const std::string&
s =
"");
168 GTSAM_EXPORT std::istream&
operator>>(std::istream& inputStream,
Matrix& destinationMatrix);
179 template<
class MATRIX>
193 template <
typename Derived1,
typename Derived2>
195 fullMatrix.block(
i,
j, subMatrix.rows(), subMatrix.cols()) = subMatrix;
201 GTSAM_EXPORT
Matrix diag(
const std::vector<Matrix>& Hs);
209 template<
class MATRIX>
220 template<
class MATRIX>
230 template<
class MATRIX>
232 const size_t m =
A.rows(),
n =
A.cols();
234 for (
size_t j=0;
j<k; ++
j)
244 template <
int OutM,
int OutN,
int OutOptions,
int InM,
int InN,
int InOptions>
254 template <
int M,
int InOptions>
263 template <
int M,
int N,
int InOptions>
272 template <
int M,
int N,
int InOptions>
276 return in.transpose();
280 template <
int OutM,
int OutN,
int OutOptions,
int InM,
int InN,
int InOptions>
282 static_assert(InM * InN == OutM * OutN);
292 GTSAM_EXPORT std::pair<Matrix,Matrix>
qr(
const Matrix&
A);
309 GTSAM_EXPORT std::list<std::tuple<Vector, double, double> >
364 GTSAM_EXPORT
Matrix stack(
const std::vector<Matrix>& blocks);
376 GTSAM_EXPORT
Matrix collect(
const std::vector<const Matrix *>& matrices,
size_t m = 0,
size_t n = 0);
401 return (Matrix3() << 0.0, -wz, +wy, +wz, 0.0, -wx, -wy, +wx, 0.0).finished();
404 template <
class Derived>
436 GTSAM_EXPORT std::tuple<int, double, Vector>
467 for (
size_t j = 0;
j <
N;
j++)
468 H1->template middleCols<N>(
N *
j) = -
c[
j] * invA;
480 template <
typename T,
int N>
list< std::tuple< Vector, double, double > > weighted_eliminate(Matrix &A, Vector &b, const Vector &sigmas)
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy y set format x g set format y g set format x2 g set format y2 g set format z g set angles radians set nogrid set key title set key left top Right noreverse box linetype linewidth samplen spacing width set nolabel set noarrow set nologscale set logscale x set set pointsize set encoding default set nopolar set noparametric set set set set surface set nocontour set clabel set mapping cartesian set nohidden3d set cntrparam order set cntrparam linear set cntrparam levels auto set cntrparam points set size set set xzeroaxis lt lw set x2zeroaxis lt lw set yzeroaxis lt lw set y2zeroaxis lt lw set tics in set ticslevel set tics set mxtics default set mytics default set mx2tics default set my2tics default set xtics border mirror norotate autofreq set ytics border mirror norotate autofreq set ztics border nomirror norotate autofreq set nox2tics set noy2tics set timestamp bottom norotate set rrange[*:*] noreverse nowriteback set trange[*:*] noreverse nowriteback set urange[*:*] noreverse nowriteback set vrange[*:*] noreverse nowriteback set xlabel matrix size set x2label set timefmt d m y n H
Vector operator^(const Matrix &A, const Vector &v)
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > MatrixRowMajor
std::tuple< int, double, Vector > DLT(const Matrix &A, double rank_tol)
Namespace containing all symbols from the Eigen library.
istream & operator>>(istream &inputStream, Matrix &destinationMatrix)
const MATRIX::ConstColXpr column(const MATRIX &A, size_t j)
void zeroBelowDiagonal(MATRIX &A, size_t cols=0)
Expression of a fixed-size or dynamic-size block.
typedef and functions to augment Eigen's VectorXd
VectorN operator()(const MatrixN &A, const VectorN &b, OptionalJacobian< N, N *N > H1={}, OptionalJacobian< N, N > H2={}) const
A.inverse() * b, with optional derivatives.
Array< double, 1, 3 > e(1./3., 0.5, 2.)
void householder(Matrix &A, size_t k)
Matrix inverse_square_root(const Matrix &A)
Matrix diag(const std::vector< Matrix > &Hs)
T expm(const Vector &x, int K=7)
std::function< VectorN(const T &, const VectorN &, OptionalJacobian< N, M >, OptionalJacobian< N, N >)> Operator
static ReshapedType reshape(const Eigen::Matrix< double, InM, InN, InOptions > &in)
void householder_(Matrix &A, size_t k, bool copy_vectors)
bool equal_with_abs_tol(const Eigen::DenseBase< MATRIX > &A, const Eigen::DenseBase< MATRIX > &B, double tol=1e-9)
Eigen::Matrix< double, N, 1 > VectorN
const Eigen::IOFormat & matlabFormat()
pair< Matrix, Matrix > qr(const Matrix &A)
bool operator==(const Matrix &A, const Matrix &B)
Reshape< OutM, OutN, OutOptions, InM, InN, InOptions >::ReshapedType reshape(const Eigen::Matrix< double, InM, InN, InOptions > &m)
VectorN operator()(const T &a, const VectorN &b, OptionalJacobian< N, M > H1={}, OptionalJacobian< N, N > H2={}) const
f(a).inverse() * b, with optional derivatives
Matrix3 skewSymmetric(double wx, double wy, double wz)
void print(const Matrix &A, const string &s, ostream &stream)
Eigen::Block< const MATRIX > sub(const MATRIX &A, size_t i1, size_t i2, size_t j1, size_t j2)
void vector_scale_inplace(const Vector &v, Matrix &A, bool inf_mask)
const MATRIX::ConstRowXpr row(const MATRIX &A, size_t j)
#define GTSAM_MAKE_MATRIX_DEFS(N)
Matrix stack(size_t nrMatrices,...)
Eigen::Matrix< double, N, N > MatrixN
Matrix RtR(const Matrix &A)
Matrix cholesky_inverse(const Matrix &A)
bool fpEqual(double a, double b, double tol, bool check_relative_also)
Special class for optional Jacobian arguments.
Vector columnNormSquare(const Matrix &A)
const typedef Eigen::Matrix< double, M, M, InOptions > & ReshapedType
A matrix or vector expression mapping an existing array of data.
Eigen::Map< const Eigen::Matrix< double, OutM, OutN, OutOptions > > ReshapedType
Map< Matrix< T, Dynamic, Dynamic, ColMajor >, 0, OuterStride<> > matrix(T *data, int rows, int cols, int stride)
void svd(const Matrix &A, Matrix &U, Vector &S, Matrix &V)
const typedef Block< const Derived, internal::traits< Derived >::RowsAtCompileTime, 1, !IsRowMajor > ConstColXpr
void save(const Matrix &A, const string &s, const string &filename)
void inplace_QR(Matrix &A)
static ReshapedType reshape(const Eigen::Matrix< double, M, N, InOptions > &in)
Vector backSubstituteUpper(const Matrix &U, const Vector &b, bool unit)
Eigen::Matrix< double, M, N, InOptions >::ConstTransposeReturnType ReshapedType
bool operator!=(const Matrix &A, const Matrix &B)
Matrix vector_scale(const Vector &v, const Matrix &A, bool inf_mask)
Matrix trans(const Matrix &A)
Eigen::Matrix< double, N, N > MatrixN
Vector backSubstituteLower(const Matrix &L, const Vector &b, bool unit)
void insertSub(Eigen::MatrixBase< Derived1 > &fullMatrix, const Eigen::MatrixBase< Derived2 > &subMatrix, size_t i, size_t j)
Array< int, Dynamic, 1 > v
static ReshapedType reshape(const Eigen::Matrix< double, M, M, InOptions > &in)
bool assert_equal(const Matrix &expected, const Matrix &actual, double tol)
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE Scalar * data() const
const typedef Eigen::Matrix< double, M, N, InOptions > & ReshapedType
bool assert_inequal(const Matrix &A, const Matrix &B, double tol)
The matrix class, also used for vectors and row-vectors.
Base class for all dense matrices, vectors, and expressions.
bool linear_independent(const Matrix &A, const Matrix &B, double tol)
Matrix collect(const std::vector< const Matrix * > &matrices, size_t m, size_t n)
static ReshapedType reshape(const Eigen::Matrix< double, M, N, InOptions > &in)
const typedef Block< const Derived, 1, internal::traits< Derived >::ColsAtCompileTime, IsRowMajor > ConstRowXpr
MATRIX prod(const MATRIX &A, const MATRIX &B)
Eigen::Matrix< double, N, 1 > VectorN
MultiplyWithInverseFunction(const Operator &phi)
Construct with function as explained above.
bool linear_dependent(const Matrix &A, const Matrix &B, double tol)
std::string formatMatrixIndented(const std::string &label, const Matrix &matrix, bool makeVectorHorizontal)
Matrix LLt(const Matrix &A)
Matrix< RealScalar, Dynamic, Dynamic > M
gtsam
Author(s):
autogenerated on Fri Nov 1 2024 03:33:35