CHROMA
Public Member Functions | Private Attributes | List of all members

Linear combination of a Linear Operator. More...

#include <llincomb.h>

Inheritance diagram for Chroma::llincomb< T, C >:
Chroma::LinearOperator< T >

Public Member Functions

 llincomb (const LinearOperator< T > *p, const C &add_const_, const C &scale_fact_)
 Initialize pointer with existing pointer. More...
 
 llincomb (Handle< const LinearOperator< T > > p, const C &add_const_, const C &scale_fact_)
 Copy pointer (one more owner) More...
 
 ~llincomb ()
 Destructor. More...
 
const Subset & subset () const
 Subset comes from underlying operator. More...
 
void operator() (T &chi, const T &psi, enum PlusMinus isign) const
 Apply the operator onto a source std::vector. More...
 
- Public Member Functions inherited from Chroma::LinearOperator< T >
virtual ~LinearOperator ()
 Virtual destructor to help with cleanup;. More...
 
virtual void operator() (T &chi, const T &psi, enum PlusMinus isign, Real epsilon) const
 Apply the operator onto a source std::vector to some precision. More...
 
virtual unsigned long nFlops () const
 

Private Attributes

const Handle< const LinearOperator< T > > A
 
const C add_const
 
const C scale_fact
 

Detailed Description

template<typename T, class C>
class Chroma::llincomb< T, C >

Linear combination of a Linear Operator.

This operator does the linear combination (z1 + z2*B)*psi

Definition at line 19 of file llincomb.h.

Constructor & Destructor Documentation

◆ llincomb() [1/2]

template<typename T , class C >
Chroma::llincomb< T, C >::llincomb ( const LinearOperator< T > *  p,
const C &  add_const_,
const C &  scale_fact_ 
)
inline

Initialize pointer with existing pointer.

Requires that the pointer p is a return value of new

Definition at line 24 of file llincomb.h.

◆ llincomb() [2/2]

template<typename T , class C >
Chroma::llincomb< T, C >::llincomb ( Handle< const LinearOperator< T > >  p,
const C &  add_const_,
const C &  scale_fact_ 
)
inline

Copy pointer (one more owner)

Definition at line 28 of file llincomb.h.

◆ ~llincomb()

template<typename T , class C >
Chroma::llincomb< T, C >::~llincomb ( )
inline

Destructor.

Definition at line 32 of file llincomb.h.

Member Function Documentation

◆ operator()()

template<typename T , class C >
void Chroma::llincomb< T, C >::operator() ( T chi,
const T psi,
enum PlusMinus  isign 
) const
inlinevirtual

Apply the operator onto a source std::vector.

For this operator, the sign is ignored

Implements Chroma::LinearOperator< T >.

Definition at line 39 of file llincomb.h.

References Chroma::llincomb< T, C >::A, Chroma::llincomb< T, C >::add_const, Chroma::chi(), Chroma::isign, Chroma::psi, and Chroma::llincomb< T, C >::scale_fact.

◆ subset()

template<typename T , class C >
const Subset& Chroma::llincomb< T, C >::subset ( void  ) const
inlinevirtual

Subset comes from underlying operator.

Implements Chroma::LinearOperator< T >.

Definition at line 35 of file llincomb.h.

References Chroma::llincomb< T, C >::A.

Member Data Documentation

◆ A

template<typename T , class C >
const Handle< const LinearOperator<T> > Chroma::llincomb< T, C >::A
private

◆ add_const

template<typename T , class C >
const C Chroma::llincomb< T, C >::add_const
private

Definition at line 49 of file llincomb.h.

Referenced by Chroma::llincomb< T, C >::operator()().

◆ scale_fact

template<typename T , class C >
const C Chroma::llincomb< T, C >::scale_fact
private

Definition at line 50 of file llincomb.h.

Referenced by Chroma::llincomb< T, C >::operator()().


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