MADNESS  0.10.1
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
madness::CoeffTracker< T, NDIM > Class Template Reference

a class to track where relevant (parent) coeffs are More...

#include <funcimpl.h>

Collaboration diagram for madness::CoeffTracker< T, NDIM >:
Collaboration graph
[legend]

Public Member Functions

 CoeffTracker ()
 default ctor More...
 
 CoeffTracker (const CoeffTracker &other)
 copy ctor More...
 
 CoeffTracker (const CoeffTracker &other, const datumT &datum)
 ctor with a pair<keyT,nodeT> More...
 
 CoeffTracker (const implT *impl)
 the initial ctor making the root key More...
 
Future< CoeffTrackeractivate () const
 find the coefficients More...
 
const coeffTcoeff () const
 const reference to the coeffs More...
 
coeffT coeff (const keyT &key) const
 return the coefficients belonging to the passed-in key More...
 
double dnorm (const keyT &key) const
 return the s and dnorm belonging to the passed-in key More...
 
const implTget_impl () const
 const reference to impl More...
 
const LeafStatusis_leaf () const
 const reference to is_leaf flag More...
 
const keyTkey () const
 const reference to the key More...
 
CoeffTracker make_child (const keyT &child) const
 make a child of this, ignoring the coeffs More...
 
template<typename Archive >
void serialize (const Archive &ar)
 serialization More...
 

Private Types

typedef GenTensor< TcoeffT
 
typedef std::pair< Key< NDIM >, ShallowNode< T, NDIM > > datumT
 
typedef FunctionImpl< T, NDIMimplT
 
typedef Key< NDIMkeyT
 
enum  LeafStatus { no , yes , unknown }
 

Private Member Functions

CoeffTracker forward_ctor (const CoeffTracker &other, const datumT &datum) const
 taskq-compatible forwarding to the ctor More...
 

Private Attributes

coeffT coeff_
 the coefficients belonging to key More...
 
double dnorm_ =-1.0
 norm of d coefficients corresponding to key More...
 
const implTimpl
 the funcimpl that has the coeffs More...
 
LeafStatus is_leaf_
 flag if key is a leaf node More...
 
keyT key_
 the current key, which must exists in impl More...
 

Detailed Description

template<typename T, size_t NDIM>
class madness::CoeffTracker< T, NDIM >

a class to track where relevant (parent) coeffs are

E.g. if a 6D function is composed of two 3D functions their coefficients must be tracked. We might need coeffs from a box that does not exist, and to avoid searching for parents we track which are their required respective boxes.

Usage: 1. make the child of a given CoeffTracker. If the parent CoeffTracker refers to a leaf node (flag is_leaf) the child will refer to the same node. Otherwise it will refer to the child node.

  1. retrieve its coefficients (possible communication/ returns a Future). Member variable key always refers to an existing node, so we can fetch it. Once we have the node we can determine if it has children which allows us to make a child (see 1. )

Member Typedef Documentation

◆ coeffT

template<typename T , size_t NDIM>
typedef GenTensor<T> madness::CoeffTracker< T, NDIM >::coeffT
private

◆ datumT

template<typename T , size_t NDIM>
typedef std::pair<Key<NDIM>,ShallowNode<T,NDIM> > madness::CoeffTracker< T, NDIM >::datumT
private

◆ implT

template<typename T , size_t NDIM>
typedef FunctionImpl<T,NDIM> madness::CoeffTracker< T, NDIM >::implT
private

◆ keyT

template<typename T , size_t NDIM>
typedef Key<NDIM> madness::CoeffTracker< T, NDIM >::keyT
private

Member Enumeration Documentation

◆ LeafStatus

template<typename T , size_t NDIM>
enum madness::CoeffTracker::LeafStatus
private
Enumerator
no 
yes 
unknown 

Constructor & Destructor Documentation

◆ CoeffTracker() [1/4]

template<typename T , size_t NDIM>
madness::CoeffTracker< T, NDIM >::CoeffTracker ( )
inline

◆ CoeffTracker() [2/4]

template<typename T , size_t NDIM>
madness::CoeffTracker< T, NDIM >::CoeffTracker ( const implT impl)
inline

◆ CoeffTracker() [3/4]

template<typename T , size_t NDIM>
madness::CoeffTracker< T, NDIM >::CoeffTracker ( const CoeffTracker< T, NDIM > &  other,
const datumT datum 
)
inlineexplicit

◆ CoeffTracker() [4/4]

template<typename T , size_t NDIM>
madness::CoeffTracker< T, NDIM >::CoeffTracker ( const CoeffTracker< T, NDIM > &  other)
inline

copy ctor

Member Function Documentation

◆ activate()

template<typename T , size_t NDIM>
Future<CoeffTracker> madness::CoeffTracker< T, NDIM >::activate ( ) const
inline

◆ coeff() [1/2]

template<typename T , size_t NDIM>
const coeffT& madness::CoeffTracker< T, NDIM >::coeff ( ) const
inline

◆ coeff() [2/2]

template<typename T , size_t NDIM>
coeffT madness::CoeffTracker< T, NDIM >::coeff ( const keyT key) const
inline

◆ dnorm()

template<typename T , size_t NDIM>
double madness::CoeffTracker< T, NDIM >::dnorm ( const keyT key) const
inline

◆ forward_ctor()

template<typename T , size_t NDIM>
CoeffTracker madness::CoeffTracker< T, NDIM >::forward_ctor ( const CoeffTracker< T, NDIM > &  other,
const datumT datum 
) const
inlineprivate

taskq-compatible forwarding to the ctor

References madness::CoeffTracker< T, NDIM >::CoeffTracker().

Referenced by madness::CoeffTracker< T, NDIM >::activate().

◆ get_impl()

template<typename T , size_t NDIM>
const implT* madness::CoeffTracker< T, NDIM >::get_impl ( ) const
inline

◆ is_leaf()

template<typename T , size_t NDIM>
const LeafStatus& madness::CoeffTracker< T, NDIM >::is_leaf ( ) const
inline

◆ key()

template<typename T , size_t NDIM>
const keyT& madness::CoeffTracker< T, NDIM >::key ( ) const
inline

◆ make_child()

template<typename T , size_t NDIM>
CoeffTracker madness::CoeffTracker< T, NDIM >::make_child ( const keyT child) const
inline

◆ serialize()

template<typename T , size_t NDIM>
template<typename Archive >
void madness::CoeffTracker< T, NDIM >::serialize ( const Archive &  ar)
inline

Member Data Documentation

◆ coeff_

template<typename T , size_t NDIM>
coeffT madness::CoeffTracker< T, NDIM >::coeff_
private

◆ dnorm_

template<typename T , size_t NDIM>
double madness::CoeffTracker< T, NDIM >::dnorm_ =-1.0
private

norm of d coefficients corresponding to key

Referenced by madness::CoeffTracker< T, NDIM >::dnorm(), and madness::CoeffTracker< T, NDIM >::serialize().

◆ impl

template<typename T , size_t NDIM>
const implT* madness::CoeffTracker< T, NDIM >::impl
private

◆ is_leaf_

template<typename T , size_t NDIM>
LeafStatus madness::CoeffTracker< T, NDIM >::is_leaf_
private

◆ key_

template<typename T , size_t NDIM>
keyT madness::CoeffTracker< T, NDIM >::key_
private

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