PhysicsBasedAnimationToolkit 0.0.10
Cross-platform C++20 library of algorithms and data structures commonly used in computer graphics research on physically-based simulation.
|
Zero-overhead composite type satisfying the CLinearOperator concept. More...
#include <LinearOperator.h>
Public Types | |
enum | { ColsAtCompileTime = Eigen::Dynamic , MaxColsAtCompileTime = Eigen::Dynamic , RowsAtCompileTime = Eigen::Dynamic , MaxRowsAtCompileTime = Eigen::Dynamic , IsRowMajor = false } |
using | SelfType = LinearOperator<TLinearOperators...> |
Instance type. | |
using | BaseType = Eigen::EigenBase<SelfType> |
EigenBase type. | |
using | Scalar = pbat::Scalar |
Eigen typedef. | |
using | RealScalar = pbat::Scalar |
Eigen typedef. | |
using | StorageIndex = typename CSCMatrix::StorageIndex |
Eigen typedef. | |
using | NestedExpression = SelfType |
Eigen typedef. | |
Public Member Functions | |
LinearOperator (TLinearOperators const &... inOps) | |
Construct a new Linear Operator object from a list of linear operators. | |
SelfType & | operator= (SelfType const &)=delete |
template<class TDerivedIn, class TDerivedOut> | |
void | Apply (Eigen::MatrixBase< TDerivedIn > const &x, Eigen::DenseBase< TDerivedOut > &y) const |
Applies all linear operators on x, adding result to y. | |
CSCMatrix | ToMatrix () const |
Construct the matrix of all underlying matrices obtained by Lops. | |
pbat::Index | OutputDimensions () const |
Number of rows. | |
pbat::Index | InputDimensions () const |
Number of columns. | |
BaseType::Index | rows () const |
Number of rows (Eigen compatibility) | |
BaseType::Index | cols () const |
Number of columns (Eigen compatibility) | |
template<class Rhs> | |
Eigen::Product< SelfType, Rhs, Eigen::AliasFreeProduct > | operator* (Eigen::MatrixBase< Rhs > const &x) const |
Lazily left-multiply x by this linear operator. | |
Zero-overhead composite type satisfying the CLinearOperator concept.
Provides interoperability with the Eigen API, i.e. can be used in product expression, and is usable in any IterativeLinearSolver (with suitable preconditioner, i.e. the preconditioner should not be constructible by analyzing matrix coefficients, since LinearOperator does not require storing any matrix).
Refer to LinearOperator.cpp for usage examples.
...TLinearOperators | List of linear operators to be composed ordered from left to right. |
|
inline |
Construct a new Linear Operator object from a list of linear operators.
inOps | List of linear operators to be composed ordered from left to right. |
|
inline |
Applies all linear operators on x, adding result to y.
TDerivedIn | Eigen matrix expression. |
TDerivedOut | Writeable Eigen matrix expression. |
x | Input vector or matrix. |
y | Output vector or matrix. |
|
inline |
Number of columns (Eigen compatibility)
|
inline |
Number of columns.
|
inline |
Lazily left-multiply x by this linear operator.
Rhs | Right-hand side matrix or vector expression |
x | Right-hand side matrix or vector |
|
inline |
Number of rows.
|
inline |
Number of rows (Eigen compatibility)
|
inline |
Construct the matrix of all underlying matrices obtained by Lops.