MADNESS 0.10.1
madness::SupBoundMap< NDIM > Class Template Reference

Bounds on sup|f| per box of a function's tree (supbound.h). More...

#include <supbound.h>

Public Types

typedef std::unordered_map< Key< NDIM >, double, Hash< Key< NDIM > > > mapT

Public Member Functions

 SupBoundMap ()=default
 SupBoundMap (mapT bound)
double operator() (Key< NDIM > key, bool *below_leaf=nullptr) const
std::size_t size () const
 the number of boxes held

Static Public Member Functions

template<typename T>
static double leaf_bound (const Key< NDIM > &key, const Tensor< T > &c, const Tensor< double > &weights)
static Tensor< double > leaf_weights (const int k)
 the weights of the leaf bound, prod_d sqrt(2 i_d + 1), for k coefficients per dimension
static constexpr double unbounded ()
 the answer for a box the map holds no bound for

Private Attributes

mapT bound_

Detailed Description

template<std::size_t NDIM>
class madness::SupBoundMap< NDIM >

Bounds on sup|f| per box of a function's tree (supbound.h).

Member Typedef Documentation

◆ mapT

template<std::size_t NDIM>
typedef std::unordered_map<Key<NDIM>, double, Hash<Key<NDIM> > > madness::SupBoundMap< NDIM >::mapT

Constructor & Destructor Documentation

◆ SupBoundMap() [1/2]

template<std::size_t NDIM>
madness::SupBoundMap< NDIM >::SupBoundMap ( )
default

◆ SupBoundMap() [2/2]

template<std::size_t NDIM>
madness::SupBoundMap< NDIM >::SupBoundMap ( mapT bound)
inlineexplicit

References bound_.

Member Function Documentation

◆ leaf_bound()

template<std::size_t NDIM>
template<typename T>
double madness::SupBoundMap< NDIM >::leaf_bound ( const Key< NDIM > & key,
const Tensor< T > & c,
const Tensor< double > & weights )
inlinestatic

A bound on sup|f| over the box key, from f's scaling coefficients c there and the weights of leaf_weights(k). No coefficients means f vanishes in the box.

References std::abs(), c, cc, madness::copy(), madness::FunctionDefaults< NDIM >::get_cell_volume(), madness::Key< NDIM >::level(), MADNESS_CHECK_THROW, NDIM, p(), w(), and madness::weights.

Referenced by madness::FunctionImpl< T, LDIM >::sup_bound_map(), and test_sup_bound().

◆ leaf_weights()

template<std::size_t NDIM>
Tensor< double > madness::SupBoundMap< NDIM >::leaf_weights ( const int k)
inlinestatic

the weights of the leaf bound, prod_d sqrt(2 i_d + 1), for k coefficients per dimension

References d, madness::FunctionDefaults< NDIM >::k, NDIM, madness::outer(), and w().

Referenced by madness::FunctionImpl< T, LDIM >::sup_bound_map(), and test_sup_bound().

◆ operator()()

template<std::size_t NDIM>
double madness::SupBoundMap< NDIM >::operator() ( Key< NDIM > key,
bool * below_leaf = nullptr ) const
inline

The bound for the box key: its own, or the leaf's it lies below; unbounded() for a box the map holds neither for. below_leaf, if given, is set when the answer is a leaf's above key.

References bound_, madness::Key< NDIM >::level(), madness::Key< NDIM >::parent(), and unbounded().

◆ size()

template<std::size_t NDIM>
std::size_t madness::SupBoundMap< NDIM >::size ( ) const
inline

the number of boxes held

References bound_.

Referenced by test_sup_bound().

◆ unbounded()

template<std::size_t NDIM>
constexpr double madness::SupBoundMap< NDIM >::unbounded ( )
inlinestaticconstexpr

the answer for a box the map holds no bound for

Referenced by operator()(), and madness::SupBoundScreen< NDIM >::unbounded().

Member Data Documentation

◆ bound_

template<std::size_t NDIM>
mapT madness::SupBoundMap< NDIM >::bound_
private

Referenced by SupBoundMap(), operator()(), and size().


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