Basis.cpp
Go to the documentation of this file.
1 /* ----------------------------------------------------------------------------
2 
3  * GTSAM Copyright 2010, Georgia Tech Research Corporation,
4  * Atlanta, Georgia 30332-0415
5  * All Rights Reserved
6  * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
7 
8  * See LICENSE for the license information
9 
10  * -------------------------------------------------------------------------- */
11 
19 #include <gtsam/basis/Basis.h>
20 
21 namespace gtsam {
22 
24  Matrix result(M, w.cols() * M);
25  result.setZero();
26 
27  for (int i = 0; i < w.cols(); i++) {
28  result.block(0, i * M, M, M).diagonal().array() = w(i);
29  }
30  return result;
31 }
32 
33 } // namespace gtsam
Matrix< RealScalar, Dynamic, Dynamic > M
Definition: bench_gemm.cpp:51
Matrix kroneckerProductIdentity(size_t M, const Weights &w)
Function for computing the kronecker product of the 1*N Weight vector w with the MxM identity matrix ...
Definition: Basis.cpp:23
Eigen::MatrixXd Matrix
Definition: base/Matrix.h:39
Values result
Compute an interpolating basis.
RowVector3d w
traits
Definition: chartTesting.h:28
The matrix class, also used for vectors and row-vectors.
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR Index cols() const EIGEN_NOEXCEPT


gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:33:57