33 typedef memory::shared_ptr<gsLinearOperator>
Ptr;
36 typedef memory::unique_ptr<gsLinearOperator>
uPtr;
60 this->
apply(eye, result);
81 typedef memory::shared_ptr<gsScaledOp>
Ptr;
84 typedef memory::unique_ptr<gsScaledOp>
uPtr;
98 m_op->apply(input, x);
123 typedef memory::shared_ptr<gsIdentityOp>
Ptr;
126 typedef memory::unique_ptr<gsIdentityOp>
uPtr;
150template<
class T,
class L>
156 : m_lambda(lambda), m_rows(
rows), m_cols(
cols) {}
176template<
class T=real_t,
class L>
Identity operator.
Definition gsLinearOperator.h:119
index_t rows() const
Returns the number of rows of the operator.
Definition gsLinearOperator.h:139
gsIdentityOp(index_t dim)
Constructor taking the dimension of the identity operator.
Definition gsLinearOperator.h:129
memory::shared_ptr< gsIdentityOp > Ptr
Shared pointer for gsIdentityOp.
Definition gsLinearOperator.h:123
void apply(const gsMatrix< T > &input, gsMatrix< T > &x) const
apply the operator on the input vector and store the result in x
Definition gsLinearOperator.h:134
static uPtr make(index_t dim)
Make function returning a smart pointer.
Definition gsLinearOperator.h:132
index_t cols() const
Returns the number of columns of the operator.
Definition gsLinearOperator.h:141
memory::unique_ptr< gsIdentityOp > uPtr
Unique pointer for gsIdentityOp.
Definition gsLinearOperator.h:126
Wrapper that allows to use lambdas as a gsLinearOperator.
Definition gsLinearOperator.h:152
index_t rows() const
Returns the number of rows of the operator.
Definition gsLinearOperator.h:161
gsLinearOperator< T >::uPtr makeLinearOp(L lambda, index_t rows, index_t cols)
Wrapper that allows to use lambdas as a gsLinearOperator.
Definition gsLinearOperator.h:177
gsLinearLambdaOp(L lambda, index_t rows, index_t cols)
Constructor; see makeLinearOp for details.
Definition gsLinearOperator.h:155
void apply(const gsMatrix< T > &input, gsMatrix< T > &x) const
apply the operator on the input vector and store the result in x
Definition gsLinearOperator.h:157
index_t cols() const
Returns the number of columns of the operator.
Definition gsLinearOperator.h:162
Simple abstract class for discrete operators.
Definition gsLinearOperator.h:29
memory::unique_ptr< gsLinearOperator > uPtr
Unique pointer for gsLinearOperator.
Definition gsLinearOperator.h:36
virtual void apply(const gsMatrix< T > &input, gsMatrix< T > &x) const =0
apply the operator on the input vector and store the result in x
static gsIdentityOp< T > Identity(const index_t dim)
Identity operator.
Definition gsLinearOperator.h:39
memory::shared_ptr< gsLinearOperator > Ptr
Shared pointer for gsLinearOperator.
Definition gsLinearOperator.h:33
virtual void setOptions(const gsOptionList &)
Set options based on a gsOptionList object.
Definition gsLinearOperator.h:69
virtual index_t rows() const =0
Returns the number of rows of the operator.
static gsOptionList defaultOptions()
Get the default options as gsOptionList object.
Definition gsLinearOperator.h:65
virtual index_t cols() const =0
Returns the number of columns of the operator.
A matrix with arbitrary coefficient type and fixed or dynamic size.
Definition gsMatrix.h:41
Class which holds a list of parameters/options, and provides easy access to them.
Definition gsOptionList.h:33
Allows an operator to be multiplied with a scalar.
Definition gsLinearOperator.h:78
index_t rows() const
Returns the number of rows in the preconditioner.
Definition gsLinearOperator.h:103
virtual void apply(const gsMatrix< T > &input, gsMatrix< T > &x) const
apply the operator on the input vector and store the result in x
Definition gsLinearOperator.h:96
gsScaledOp(BasePtr op, T scalar=1)
Constructor taking a shared pointer to a linear operator and a scalar.
Definition gsLinearOperator.h:90
static uPtr make(BasePtr op, T scalar=1)
Make function returning a smart pointer.
Definition gsLinearOperator.h:93
memory::unique_ptr< gsScaledOp > uPtr
Unique pointer for gsScaledOp.
Definition gsLinearOperator.h:84
index_t cols() const
Returns the number of columns in the preconditioner.
Definition gsLinearOperator.h:106
gsLinearOperator< T >::Ptr BasePtr
Shared pointer for gsLinearOperator.
Definition gsLinearOperator.h:87
memory::shared_ptr< gsScaledOp > Ptr
Shared pointer for gsScaledOp.
Definition gsLinearOperator.h:81
#define index_t
Definition gsConfig.h:32
This is the main header file that collects wrappers of Eigen for linear algebra.
Provides a list of labeled parameters/options that can be set and accessed easily.
The G+Smo namespace, containing all definitions for the library.
S give(S &x)
Definition gsMemory.h:266