Utils¶
Logger¶
- spdlog::logger& ipc::logger();¶
Retrieves the current logger.
- Returns:¶
A const reference to the logger object.
Setup a logger object.
Calling this function with other function is not thread-safe.
New logger object to be used.
Positive Semi-Definite Projection¶
-
template <typename _Scalar, int _Rows, int _Cols, int _Options,
int _MaxRows, int _MaxCols>
Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>
ipc::project_to_psd(const Eigen::Matrix<_Scalar, _Rows, _Cols,
_Options, _MaxRows, _MaxCols>& A,
const PSDProjectionMethod method = PSDProjectionMethod::CLAMP);¶ Matrix projection onto positive semi-definite cone.
-
template <typename _Scalar, int _Rows, int _Cols, int _Options,
int _MaxRows, int _MaxCols>
Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>
ipc::project_to_pd(const Eigen::Matrix<_Scalar, _Rows, _Cols,
_Options, _MaxRows, _MaxCols>& A,
double eps = 1e-8);¶ Matrix projection onto positive definite cone.
- enum class ipc::PSDProjectionMethod;¶
Enumeration of implemented PSD projection methods.
Values:
- enumerator NONE;¶
No PSD projection.
- enumerator CLAMP;¶
Clamp negative eigenvalues to zero.
- enumerator ABS;¶
Flip negative eigenvalues to positive.
Eigen Extensions¶
- using ArrayXb = Eigen::Array<bool, Eigen::Dynamic, 1>;¶
An array of boolean scalars.
- using VectorXb = Eigen::Matrix<bool, Eigen::Dynamic, 1>;¶
A Vector of boolean scalars.
- using Vector3b = Eigen::Matrix<bool, 3, 1>;¶
A Vector of boolean scalars with a fixed size of 3x1.
-
using MatrixXb
= Eigen::Matrix<bool, Eigen::Dynamic, Eigen::Dynamic>;¶ A dynamic size matrix of boolean scalars.
-
template <typename T, int dim, int max_dim = dim>
using Vector
= Eigen::Matrix<T, dim, 1, Eigen::ColMajor, max_dim, 1>;¶ A dynamic size vector with a fixed maximum size.
-
template <typename T, int dim, int max_dim = dim>
using RowVector
= Eigen::Matrix<T, 1, dim, Eigen::RowMajor, 1, max_dim>;¶ A dynamic size row vector with a fixed maximum size.
- using Vector1d = Eigen::Vector<double, 1>;¶
A static size matrix of size of 1×1.
- using Vector6d = Eigen::Vector<double, 6>;¶
A static size matrix of size of 6×1.
- using Vector9d = Eigen::Vector<double, 9>;¶
A static size matrix of size of 9×1.
- using Vector12d = Eigen::Vector<double, 12>;¶
A static size matrix of size of 12×1.
- using Matrix6d = Eigen::Matrix<double, 6, 6>;¶
A static size matrix of size of 6×6.
- using Matrix9d = Eigen::Matrix<double, 9, 9>;¶
A static size matrix of size of 9×9.
- using Matrix12d = Eigen::Matrix<double, 12, 12>;¶
A static size matrix of size of 12×12.
-
template <typename T>
using VectorMax2 = Vector<T, Eigen::Dynamic, 2>;¶ A dynamic size matrix with a fixed maximum size of 3×1.
-
template <typename T>
using VectorMax3 = Vector<T, Eigen::Dynamic, 3>;¶ A dynamic size matrix with a fixed maximum size of 3×1.
-
template <typename T>
using VectorMax4 = Vector<T, Eigen::Dynamic, 4>;¶ A dynamic size matrix with a fixed maximum size of 4×1.
-
template <typename T>
using VectorMax6 = Vector<T, Eigen::Dynamic, 6>;¶ A dynamic size matrix with a fixed maximum size of 6×1.
-
template <typename T>
using VectorMax9 = Vector<T, Eigen::Dynamic, 9>;¶ A dynamic size matrix with a fixed maximum size of 9×1.
-
template <typename T>
using VectorMax12 = Vector<T, Eigen::Dynamic, 12>;¶ A dynamic size matrix with a fixed maximum size of 12×1.
- using VectorMax2d = VectorMax2<double>;¶
A dynamic size matrix with a fixed maximum size of 2×1.
- using VectorMax3d = VectorMax3<double>;¶
A dynamic size matrix with a fixed maximum size of 3×1.
- using VectorMax3i = VectorMax3<int>;¶
A dynamic size matrix with a fixed maximum size of 3×1.
- using VectorMax4d = VectorMax4<double>;¶
A dynamic size matrix with a fixed maximum size of 4×1.
- using VectorMax4i = VectorMax4<int>;¶
A dynamic size matrix with a fixed maximum size of 4×1.
- using VectorMax6d = VectorMax6<double>;¶
A dynamic size matrix with a fixed maximum size of 6×1.
- using VectorMax6b = VectorMax6<bool>;¶
A dynamic size matrix with a fixed maximum size of 6×1.
- using VectorMax9d = VectorMax9<double>;¶
A dynamic size matrix with a fixed maximum size of 9×1.
- using VectorMax12d = VectorMax12<double>;¶
A dynamic size matrix with a fixed maximum size of 12×1.
-
template <typename T>
using RowVectorMax2 = RowVector<T, Eigen::Dynamic, 2>;¶ A dynamic size matrix with a fixed maximum size of 1×2.
-
template <typename T>
using RowVectorMax3 = RowVector<T, Eigen::Dynamic, 3>;¶ A dynamic size matrix with a fixed maximum size of 1×3.
- using RowVectorMax2d = RowVectorMax2<double>;¶
A dynamic size matrix with a fixed maximum size of 1×2.
- using RowVectorMax3d = RowVectorMax3<double>;¶
A dynamic size matrix with a fixed maximum size of 1×3.
- using RowVectorMax6d = RowVector<double, Eigen::Dynamic, 6>;¶
A dynamic size matrix with a fixed maximum size of 6×1.
- using RowVectorMax9d = RowVector<double, Eigen::Dynamic, 9>;¶
A dynamic size matrix with a fixed maximum size of 9×1.
- using RowVectorMax12d = RowVector<double, Eigen::Dynamic, 12>;¶
A dynamic size matrix with a fixed maximum size of 12×1.
-
template <typename T, int max_rows, int max_cols>
using MatrixMax = Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic,
Eigen::ColMajor, max_rows, max_cols>;¶
- template <typename T> using MatrixMax2 = MatrixMax<T, 2, 2>;¶
A dynamic size matrix with a fixed maximum size of 3×3.
- template <typename T> using MatrixMax3 = MatrixMax<T, 3, 3>;¶
A dynamic size matrix with a fixed maximum size of 3×3.
- template <typename T> using MatrixMax6 = MatrixMax<T, 6, 6>;¶
A dynamic size matrix with a fixed maximum size of 6×6.
- template <typename T> using MatrixMax9 = MatrixMax<T, 9, 9>;¶
A dynamic size matrix with a fixed maximum size of 9×9.
- template <typename T> using MatrixMax12 = MatrixMax<T, 12, 12>;¶
A dynamic size matrix with a fixed maximum size of 12×12.
- using MatrixMax2d = MatrixMax2<double>;¶
A dynamic size matrix with a fixed maximum size of 3×3.
- using MatrixMax3d = MatrixMax3<double>;¶
A dynamic size matrix with a fixed maximum size of 3×3.
- using MatrixMax6d = MatrixMax6<double>;¶
A dynamic size matrix with a fixed maximum size of 6×6.
- using MatrixMax9d = MatrixMax9<double>;¶
A dynamic size matrix with a fixed maximum size of 12×12.
- using MatrixMax12d = MatrixMax12<double>;¶
A dynamic size matrix with a fixed maximum size of 12×12.
-
using DiagonalMatrixXd
= Eigen::DiagonalMatrix<double, Eigen::Dynamic>;¶ A dynamic size diagonal matrix.
-
using DiagonalMatrixMax6d
= Eigen::DiagonalMatrix<double, Eigen::Dynamic, 6>;¶ A dynamic size diagonal matrix with a fixed maximum size of 6×6.
-
template <typename T>
using ArrayMax2
= Eigen::Array<T, Eigen::Dynamic, 1, Eigen::ColMajor, 2, 1>;¶ A dynamic size array with a fixed maximum size of 2×1.
-
template <typename T>
using ArrayMax3
= Eigen::Array<T, Eigen::Dynamic, 1, Eigen::ColMajor, 3, 1>;¶ A dynamic size array with a fixed maximum size of 2×1.