OPALX (Object Oriented Parallel Accelerator Library for Exascal) MINIorX
OPALX
Expressions::Indexer< T > Class Template Reference

A scalar expression to retrieve an indexed component from an array. More...

#include <Indexer.h>

Inheritance diagram for Expressions::Indexer< T >:
Collaboration diagram for Expressions::Indexer< T >:

Public Member Functions

 Indexer (PtrToArray< T > array, PtrToScalar< double > index)
 Constructor.
 Indexer (const Indexer< T > &)
virtual ~Indexer ()
virtual Scalar< T > * clone () const
 Make clone.
virtual T evaluate () const
 Evaluate.
virtual void print (std::ostream &str, int precedence=99) const
 Print expression.
virtual bool isConstant () const
 Test for constant.

Private Member Functions

 Indexer ()
void operator= (const Indexer &)

Private Attributes

PtrToArray< Tlft
PtrToScalar< double > rgt

Detailed Description

template<class T>
class Expressions::Indexer< T >

A scalar expression to retrieve an indexed component from an array.

Definition at line 40 of file Indexer.h.

Constructor & Destructor Documentation

◆ Indexer() [1/3]

template<class T>
Expressions::Indexer< T >::Indexer ( PtrToArray< T > array,
PtrToScalar< double > index )
inline

Constructor.

Definition at line 83 of file Indexer.h.

References lft, and rgt.

Referenced by clone(), Indexer(), and operator=().

Here is the caller graph for this function:

◆ Indexer() [2/3]

template<class T>
Expressions::Indexer< T >::Indexer ( const Indexer< T > & )

References Indexer(), and Expressions::Scalar< T >::Scalar().

Here is the call graph for this function:

◆ ~Indexer()

template<class T>
Expressions::Indexer< T >::~Indexer ( )
inlinevirtual

Definition at line 89 of file Indexer.h.

◆ Indexer() [3/3]

template<class T>
Expressions::Indexer< T >::Indexer ( )
private

Member Function Documentation

◆ clone()

template<class T>
Scalar< T > * Expressions::Indexer< T >::clone ( ) const
inlinevirtual

Make clone.

Implements Expressions::Scalar< T >.

Definition at line 94 of file Indexer.h.

References Indexer(), and Expressions::Scalar< T >::Scalar().

Here is the call graph for this function:

◆ evaluate()

template<class T>
T Expressions::Indexer< T >::evaluate ( ) const
inlinevirtual

Evaluate.

Implements Expressions::Scalar< T >.

Definition at line 100 of file Indexer.h.

References lft, and rgt.

◆ isConstant()

template<class T>
bool Expressions::Scalar< T >::isConstant ( ) const
inlinevirtualinherited

Test for constant.

Reimplemented in Expressions::SConstant< T >.

Definition at line 282 of file AbstractObjects/Expressions.h.

◆ operator=()

template<class T>
void Expressions::Indexer< T >::operator= ( const Indexer< T > & )
private

References Indexer().

Here is the call graph for this function:

◆ print()

template<class T>
void Expressions::Indexer< T >::print ( std::ostream & str,
int precedence = 99 ) const
inlinevirtual

Print expression.

Implements Expressions::Scalar< T >.

Definition at line 113 of file Indexer.h.

References lft, and rgt.

Member Data Documentation

◆ lft

template<class T>
PtrToArray<T> Expressions::Indexer< T >::lft
private

Definition at line 67 of file Indexer.h.

Referenced by evaluate(), Indexer(), and print().

◆ rgt

template<class T>
PtrToScalar<double> Expressions::Indexer< T >::rgt
private

Definition at line 68 of file Indexer.h.

Referenced by evaluate(), Indexer(), and print().


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