MADNESS
version 0.9
|
Key is the index for a node of the 2^NDIM-tree. More...
#include <key.h>
Public Member Functions | |
Key () | |
Default constructor makes an uninitialized key. More... | |
Key (Level n, const Vector< Translation, NDIM > &l) | |
Constructor with given n, l. More... | |
Key (int n) | |
Constructor with given n and l=0. More... | |
Key (Level n, Translation p) | |
Constructor from lexical index in depth first order. More... | |
Key (const int n, const int l0) | |
easy constructor More... | |
Key (const int n, const int l0, const int l1, const int l2) | |
easy constructor More... | |
bool | is_invalid () const |
Checks if a key is invalid. More... | |
bool | is_valid () const |
Checks if a key is valid. More... | |
bool | operator== (const Key &other) const |
Equality test. More... | |
bool | operator!= (const Key &other) const |
bool | operator< (const Key &other) const |
Comparison based upon depth first lexical order. More... | |
hashT | hash () const |
Level | level () const |
const Vector< Translation, NDIM > & | translation () const |
uint64_t | distsq () const |
Key | parent (int generation=1) const |
Returns the key of the parent. More... | |
bool | is_child_of (const Key &key) const |
bool | is_parent_of (const Key &key) const |
bool | is_neighbor_of (const Key &key, const std::vector< bool > &bperiodic) const |
Assuming keys are at the same level, returns true if displaced by no more than 1 in any direction. More... | |
Key | neighbor (const Key< NDIM > &disp) const |
given a displacement, generate a neighbor key; ignore boundary conditions and disp's level More... | |
bool | thisKeyContains (const Vector< double, NDIM > &x, const unsigned int &dim0, const unsigned int &dim1) const |
check if this MultiIndex contains point x, disregarding these two dimensions More... | |
template<std::size_t LDIM, std::size_t KDIM> | |
void | break_apart (Key< LDIM > &key1, Key< KDIM > &key2) const |
break key into two low-dimensional keys More... | |
template<std::size_t LDIM> | |
Key< NDIM+LDIM > | merge_with (const Key< LDIM > &rhs) const |
merge with other key (ie concatenate), use level of rhs, not of this More... | |
bool | is_farther_out_than (const Key< NDIM > &other) const |
return if the other key is pointing in the same direction and is farther out More... | |
void | rehash () |
Recomputes hashval ... presently only done when reading from external storage. More... | |
Static Public Member Functions | |
static Key< NDIM > | invalid () |
Returns an invalid key. More... | |
Friends | |
class | KeyChildIterator< NDIM > |
Key is the index for a node of the 2^NDIM-tree.
See KeyChildIterator for facile generation of children, and foreach_child(parent,op) for facile applicaiton of operators to child keys.
|
inline |
Default constructor makes an uninitialized key.
Referenced by madness::Key< OPDIM >::neighbor(), and madness::Key< OPDIM >::parent().
|
inline |
Constructor with given n, l.
|
inline |
Constructor with given n and l=0.
|
inline |
Constructor from lexical index in depth first order.
|
inline |
easy constructor
|
inline |
easy constructor
|
inline |
break key into two low-dimensional keys
Referenced by madness::SeparatedConvolution< T, NDIM >::get_source_key(), madness::FunctionImpl< T, NDIM >::multiply_op< LDIM >::make_child(), madness::FunctionImpl< T, NDIM >::hartree_op< LDIM, leaf_opT >::make_child(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::make_child(), madness::FunctionImpl< T, NDIM >::recursive_apply_op< opT, LDIM >::make_child(), madness::FunctionImpl< T, NDIM >::project_out_op< LDIM >::make_child(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::make_childrens_sum_coeffs(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::make_sum_coeffs(), madness::FunctionImpl< T, NDIM >::multiply_op< LDIM >::operator()(), madness::FunctionImpl< T, NDIM >::hartree_op< LDIM, leaf_opT >::operator()(), madness::FunctionImpl< T, NDIM >::recursive_apply_op< opT, LDIM >::operator()(), madness::FunctionImpl< T, NDIM >::project_out_op< LDIM >::operator()(), and madness::FunctionImpl< Q, NDIM >::project_out2().
|
inline |
Referenced by madness::FunctionImpl< Q, NDIM >::do_apply().
|
inline |
Referenced by LevelPmap::owner().
|
inlinestatic |
Returns an invalid key.
Referenced by madness::DerivativeBase< T, NDIM >::neighbor().
|
inline |
Referenced by madness::Key< OPDIM >::is_parent_of().
|
inline |
return if the other key is pointing in the same direction and is farther out
unlike in distsq() the direction is taken into account, and other must be longer than this in each dimension
[in] | other | a key |
|
inline |
Checks if a key is invalid.
Referenced by madness::DerivativeBase< T, NDIM >::find_neighbor(), and madness::FunctionImpl< T, NDIM >::parent_to_child().
|
inline |
Assuming keys are at the same level, returns true if displaced by no more than 1 in any direction.
Assumes key and this are at the same level
Referenced by madness::FunctionImpl< T, NDIM >::project_refine_op().
|
inline |
|
inline |
Checks if a key is valid.
Referenced by madness::FunctionImpl< T, NDIM >::broaden(), madness::FunctionImpl< Q, NDIM >::do_apply(), and madness::FunctionImpl< Q, NDIM >::do_apply_directed_screening().
|
inline |
Referenced by madness::FunctionNode< T, NDIM >::accumulate(), madness::FunctionNode< T, NDIM >::accumulate2(), madness::SeparatedConvolution< T, NDIM >::apply(), madness::SeparatedConvolution< T, NDIM >::apply2(), madness::SeparatedConvolution< T, NDIM >::apply2_lowdim(), madness::FunctionImpl< Q, NDIM >::apply_1d_realspace_push_op(), madness::FunctionImpl< T, NDIM >::broaden(), madness::SlaterF12Interface::coeff(), madness::FunctionImpl< Q, NDIM >::coeffs2values(), madness::FunctionImpl< T, NDIM >::compress_op(), madness::displacement(), madness::FunctionImpl< Q, NDIM >::do_apply(), madness::FunctionImpl< Q, NDIM >::do_apply_directed_screening(), madness::FunctionImpl< Q, NDIM >::do_binary_op(), madness::FunctionImpl< Q, NDIM >::do_mul(), madness::FunctionImpl< T, NDIM >::do_print_grid(), madness::FunctionImpl< T, NDIM >::do_print_tree(), madness::FunctionImpl< T, NDIM >::do_print_tree_graphviz(), madness::FunctionImpl< T, NDIM >::erase(), madness::FunctionImpl< Q, NDIM >::err_box(), madness::SeparatedConvolution< T, NDIM >::estimate_costs(), madness::FunctionImpl< T, NDIM >::eval(), madness::FunctionImpl< T, NDIM >::eval_local_only(), madness::FunctionImpl< T, NDIM >::evaldepthpt(), madness::FunctionImpl< T, NDIM >::evalR(), madness::fcube(), madness::FunctionImpl< Q, NDIM >::fcube_for_mul(), madness::FunctionImpl< T, NDIM >::recursive_apply_op< opT, LDIM >::finalize(), madness::FunctionImpl< T, NDIM >::recursive_apply_op2< opT >::finalize(), madness::FunctionImpl< T, NDIM >::get_norm_tree_recursive(), madness::FunctionImpl< T, NDIM >::insert_zero_down_to_initial_level(), madness::CoeffTracker< T, LDIM >::make_child(), madness::TwoElectronInterface< double, 6 >::make_coeff(), madness::Key< OPDIM >::merge_with(), madness::Convolution1D< Q >::mod_nonstandard(), madness::FunctionImpl< Q, NDIM >::mul(), madness::DerivativeBase< T, NDIM >::neighbor(), madness::Key< OPDIM >::neighbor(), madness::FunctionImpl< T, NDIM >::neighbor(), madness::FunctionImpl< Q, NDIM >::NS_fcube_for_mul(), madness::FunctionImpl< Q, NDIM >::NScoeffs2values(), DirichletLBCost< NDIM >::operator()(), madness::lbcost< T, NDIM >::operator()(), madness::error_leaf_op< T, NDIM >::operator()(), madness::hartree_leaf_op< T, NDIM >::operator()(), madness::op_leaf_op< T, NDIM, opT >::operator()(), madness::hartree_convolute_leaf_op< T, NDIM, LDIM, opT >::operator()(), madness::FunctionImpl< T, NDIM >::do_check_symmetry_local::operator()(), madness::FunctionImpl< T, NDIM >::do_mapdim::operator()(), madness::FunctionImpl< T, NDIM >::do_unary_op_value_inplace< opT >::operator()(), madness::FunctionImpl< T, NDIM >::multiply_op< LDIM >::operator()(), madness::FunctionImpl< T, NDIM >::do_standard::operator()(), LevelPmap::owner(), madness::LBDeuxPmap< NDIM >::owner(), madness::FunctionImpl< T, NDIM >::parent_to_child_NS(), madness::FunctionImpl< T, NDIM >::plot_cube_kernel(), madness::FunctionImpl< T, NDIM >::print_plane_local(), madness::FunctionImpl< T, NDIM >::project(), madness::FunctionImpl< T, NDIM >::project_refine_op(), madness::FunctionImpl< Q, NDIM >::read_grid(), madness::FunctionImpl< Q, NDIM >::read_grid2(), madness::FunctionImpl< T, NDIM >::reconstruct_op(), madness::FunctionImpl< Q, NDIM >::refine_op(), madness::FunctionNode< T, NDIM >::set_has_children_recursive(), madness::LBNodeDeux< NDIM >::sum(), madness::FunctionImpl< T, NDIM >::trace_local(), madness::FunctionImpl< T, NDIM >::trickle_down_op(), madness::FunctionImpl< T, NDIM >::truncate_op(), madness::FunctionImpl< T, NDIM >::truncate_spawn(), madness::FunctionImpl< T, NDIM >::truncate_tol(), madness::FunctionImpl< Q, NDIM >::values2coeffs(), madness::FunctionImpl< Q, NDIM >::values2NScoeffs(), madness::FunctionImpl< T, NDIM >::verify_tree(), and madness::FunctionImpl< Q, NDIM >::vtransform_doit().
|
inline |
merge with other key (ie concatenate), use level of rhs, not of this
Referenced by madness::FunctionImpl< Q, NDIM >::do_apply(), and madness::FunctionImpl< Q, NDIM >::do_apply_directed_screening().
|
inline |
given a displacement, generate a neighbor key; ignore boundary conditions and disp's level
[in] | disp | the displacement |
|
inline |
|
inline |
Comparison based upon depth first lexical order.
|
inline |
Equality test.
|
inline |
Returns the key of the parent.
Default is the immediate parent (generation=1). To get the grandparent use generation=2, and similarly for great-grandparents.
!! If there is no such parent it quietly returns the closest match (which may be self if this is the top of the tree).
Referenced by madness::FunctionNode< T, NDIM >::accumulate(), madness::FunctionNode< T, NDIM >::accumulate2(), madness::FunctionImpl< T, NDIM >::get_norm_tree_recursive(), madness::Key< OPDIM >::is_child_of(), LevelPmap::owner(), madness::LBDeuxPmap< NDIM >::owner(), madness::FunctionImpl< Q, NDIM >::read_grid(), madness::FunctionImpl< Q, NDIM >::read_grid2(), madness::FunctionNode< T, NDIM >::set_has_children_recursive(), madness::FunctionImpl< T, NDIM >::sock_it_to_me(), madness::FunctionImpl< T, NDIM >::sock_it_to_me_too(), madness::LBNodeDeux< NDIM >::sum(), madness::FunctionImpl< T, NDIM >::verify_tree(), and madness::FunctionImpl< Q, NDIM >::vtransform_doit().
|
inline |
Recomputes hashval ... presently only done when reading from external storage.
Referenced by madness::Key< OPDIM >::Key(), and madness::archive::ArchiveLoadImpl< BinaryFstreamInputArchive, Key< NDIM > >::load().
|
inline |
check if this MultiIndex contains point x, disregarding these two dimensions
Referenced by madness::FunctionImpl< T, NDIM >::print_plane_local().
|
inline |
Referenced by madness::FunctionImpl< Q, NDIM >::apply_1d_realspace_push_op(), madness::FunctionImpl< T, NDIM >::broaden(), madness::FunctionImpl< T, NDIM >::child_patch(), madness::FunctionImpl< T, NDIM >::coeffs_for_jun(), madness::displacement(), madness::DerivativeBase< T, NDIM >::do_diff1(), madness::FunctionImpl< T, NDIM >::do_print_grid(), madness::FunctionImpl< T, NDIM >::do_print_tree_graphviz(), madness::FunctionImpl< T, NDIM >::eval(), madness::FunctionImpl< T, NDIM >::eval_local_only(), madness::FunctionImpl< T, NDIM >::evaldepthpt(), madness::FunctionImpl< T, NDIM >::evalR(), madness::fcube(), madness::FunctionImpl< Q, NDIM >::fcube_for_mul(), madness::SimpleCache< madness::SeparatedConvolutionData< Q, NDIM >, 2 *NDIM >::getptr(), madness::Key< OPDIM >::is_farther_out_than(), madness::TwoElectronInterface< double, 6 >::make_coeff(), madness::Key< OPDIM >::merge_with(), madness::Convolution1D< Q >::mod_nonstandard(), madness::DerivativeBase< T, NDIM >::neighbor(), madness::Key< OPDIM >::neighbor(), madness::FunctionImpl< T, NDIM >::neighbor(), madness::FunctionImpl< Q, NDIM >::NS_fcube_for_mul(), madness::FunctionImpl< T, NDIM >::do_check_symmetry_local::operator()(), madness::FunctionImpl< T, NDIM >::do_mapdim::operator()(), madness::FunctionImpl< T, NDIM >::plot_cube_kernel(), madness::FunctionImpl< T, NDIM >::print_plane_local(), madness::FunctionImpl< Q, NDIM >::read_grid(), madness::FunctionImpl< Q, NDIM >::read_grid2(), madness::SimpleCache< madness::SeparatedConvolutionData< Q, NDIM >, 2 *NDIM >::set(), and madness::FunctionImpl< T, NDIM >::upsample().
|
friend |