FlexBox - A Flexible Primal-Dual ToolBox
Public Member Functions | List of all members
flexConcatOperator< T > Class Template Reference

represents a concatenation operator More...

#include <flexConcatOperator.h>

Inheritance diagram for flexConcatOperator< T >:
flexLinearOperator< T >

Public Member Functions

 flexConcatOperator (flexLinearOperator< T > *aA, flexLinearOperator< T > *aB, mySign aS, bool aMinus)
 initializes the concatenation operator More...
 
flexConcatOperator< T > * copy ()
 copies the linear operator More...
 
void times (bool transposed, const Tdata &input, Tdata &output)
 applies linear operator on vector More...
 
void timesPlus (bool transposed, const Tdata &input, Tdata &output)
 applies linear operator on vector and adds its result to y More...
 
void timesMinus (bool transposed, const Tdata &input, Tdata &output)
 applies linear operator on vector and substracts its result from y More...
 
getMaxRowSumAbs (bool transposed)
 returns the maximum sum of absolute values per row used for preconditioning More...
 
std::vector< T > getAbsRowSum (bool transposed)
 returns a vector of sum of absolute values per row used for preconditioning More...
 
thrust::device_vector< T > getAbsRowSumCUDA (bool transposed)
 same function as getAbsRowSum() but implemented in CUDA More...
 
- Public Member Functions inherited from flexLinearOperator< T >
 flexLinearOperator (int aNumRows, int aNumCols, linOp aType, bool aIsMinus)
 initializes the linear operator More...
 
int getNumCols () const
 returns number of columns of the linear operator More...
 
int getNumRows () const
 returns number of rows of the linear operator More...
 
void setNumCols (int aNumCols)
 sets the number of columns of the linear operator More...
 
void setNumRows (int aNumRows)
 sets the number of rows of the linear operator More...
 
void setMinus (bool aIsMinus)
 constrols if operator should be negated or not More...
 

Additional Inherited Members

- Public Attributes inherited from flexLinearOperator< T >
linOp type
 type of linear operator More...
 
bool isMinus
 determines if operator is negated
 

Detailed Description

template<typename T>
class flexConcatOperator< T >

represents a concatenation operator

Constructor & Destructor Documentation

◆ flexConcatOperator()

template<typename T>
flexConcatOperator< T >::flexConcatOperator ( flexLinearOperator< T > *  aA,
flexLinearOperator< T > *  aB,
mySign  aS,
bool  aMinus 
)
inline

initializes the concatenation operator

Parameters
aAleft hand side operator
aBright hand side operator
aStype of concatenation. Possible values are PLUS, SUBTRACT and COMPOSE.
aMinusdetermines if operator is negated
See also
isMinus

Member Function Documentation

◆ copy()

template<typename T>
flexConcatOperator<T>* flexConcatOperator< T >::copy ( )
inlinevirtual

copies the linear operator

Returns
copy of linear operator

Implements flexLinearOperator< T >.

◆ getAbsRowSum()

template<typename T>
std::vector<T> flexConcatOperator< T >::getAbsRowSum ( bool  transposed)
inlinevirtual

returns a vector of sum of absolute values per row used for preconditioning

Parameters
transposedis true if operator should be (temporarily) transposed before usage
Returns
vector of sum of absolute values per row

Implements flexLinearOperator< T >.

◆ getAbsRowSumCUDA()

template<typename T>
thrust::device_vector<T> flexConcatOperator< T >::getAbsRowSumCUDA ( bool  transposed)
inlinevirtual

same function as getAbsRowSum() but implemented in CUDA

Parameters
transposedis true if operator should be (temporarily) transposed before usage
Returns
vector of sum of absolute values per row

Implements flexLinearOperator< T >.

◆ getMaxRowSumAbs()

template<typename T>
T flexConcatOperator< T >::getMaxRowSumAbs ( bool  transposed)
inlinevirtual

returns the maximum sum of absolute values per row used for preconditioning

Parameters
transposedis true if operator should be (temporarily) transposed before usage
Returns
maximum sum of absolute values per row

Implements flexLinearOperator< T >.

◆ times()

template<typename T>
void flexConcatOperator< T >::times ( bool  transposed,
const Tdata &  input,
Tdata &  output 
)
inlinevirtual

applies linear operator on vector

equals $ y = Ax $

Parameters
transposedis true if operator should be (temporarily) transposed before usage
inputdata to be processed
outputoutput data

Implements flexLinearOperator< T >.

◆ timesMinus()

template<typename T>
void flexConcatOperator< T >::timesMinus ( bool  transposed,
const Tdata &  input,
Tdata &  output 
)
inlinevirtual

applies linear operator on vector and substracts its result from y

equals $ y = y - Ax $

Parameters
transposedis true if operator should be (temporarily) transposed before usage
inputdata to be processed
outputoutput data

Implements flexLinearOperator< T >.

◆ timesPlus()

template<typename T>
void flexConcatOperator< T >::timesPlus ( bool  transposed,
const Tdata &  input,
Tdata &  output 
)
inlinevirtual

applies linear operator on vector and adds its result to y

equals $ y = y + Ax $

Parameters
transposedis true if operator should be (temporarily) transposed before usage
inputdata to be processed
outputoutput data

Implements flexLinearOperator< T >.


The documentation for this class was generated from the following file: