Doxygen
1.9.1
|
Files | |
file | tsgHierarchyManipulator.hpp |
Algorithms for manipulating multi-indexes defined by hierarchy rules. | |
Classes | |
class | TasGrid::HierarchyManipulations::SplitDirections |
Reorganize the points into sets of nodes that align in one-dimension, used for directional localp refinement. More... | |
Functions | |
template<RuleLocal::erule effrule> | |
Data2D< int > | TasGrid::HierarchyManipulations::computeDAGup (MultiIndexSet const &mset) |
Cache the indexes slot numbers of the parents of the multi-indexes in mset. More... | |
Data2D< int > | TasGrid::HierarchyManipulations::computeDAGup (MultiIndexSet const &mset, RuleLocal::erule effrule) |
Cache the indexes slot numbers of the parents of the multi-indexes in mset. More... | |
template<RuleLocal::erule effrule> | |
Data2D< int > | TasGrid::HierarchyManipulations::computeDAGup (MultiIndexSet const &mset, bool &is_complete) |
Variant that also check if all points have all parents. More... | |
template<RuleLocal::erule effrule> | |
Data2D< int > | TasGrid::HierarchyManipulations::computeDAGDown (MultiIndexSet const &mset) |
Cache the indexes slot numbers of the children of the multi-indexes in mset. More... | |
template<RuleLocal::erule effrule> | |
std::vector< int > | TasGrid::HierarchyManipulations::computeLevels (MultiIndexSet const &mset) |
Returns a vector that is the sum of the one dimensional levels of each multi-index in the set.. More... | |
std::vector< int > | TasGrid::HierarchyManipulations::computeLevels (MultiIndexSet const &mset, RuleLocal::erule effrule) |
Overload that turns switch statement into template instantiations. More... | |
template<RuleLocal::erule effrule> | |
void | TasGrid::HierarchyManipulations::completeToLower (MultiIndexSet const &mset, MultiIndexSet &refined) |
Complete refined so that the union of refined and mset is lower w.r.t. the rule. . More... | |
template<RuleLocal::erule effrule, typename callable_method > | |
void | TasGrid::HierarchyManipulations::touchAllImmediateRelatives (std::vector< int > &point, MultiIndexSet const &mset, callable_method apply) |
Will call apply() with the slot index in mset of each parent/child of point.. More... | |
template<RuleLocal::erule effrule> | |
MultiIndexSet | TasGrid::HierarchyManipulations::getLevelZeroPoints (size_t num_dimensions) |
Return the tensor set of all points that sit on level zero (i.e., have no parents). More... | |
template<RuleLocal::erule effrule> | |
MultiIndexSet | TasGrid::HierarchyManipulations::getLargestConnected (MultiIndexSet const ¤t, MultiIndexSet const &candidates) |
Return the largest subset of candidates such that adding it to current will result in a connected graph. More... | |
template<typename T > | |
std::vector< Data2D< T > > | TasGrid::HierarchyManipulations::splitByLevels (size_t stride, typename std::vector< T >::const_iterator ibegin, typename std::vector< T >::const_iterator iend, std::vector< int >::const_iterator ilevels) |
Split the range between ibegin and iend into strips of stride and orders those by levels according to the level index in ilevels. More... | |
std::vector< Data2D< int > > | TasGrid::HierarchyManipulations::splitByLevels (MultiIndexSet const &mset, std::vector< int > const &levels) |
Overload that operates on an entire multi-index set. | |
template<typename T > | |
std::vector< Data2D< T > > | TasGrid::HierarchyManipulations::splitByLevels (Data2D< T > const &data, std::vector< int > const &levels) |
Overload that operates on an entire Data2D structure set. | |
std::vector< Data2D< double > > | TasGrid::HierarchyManipulations::splitByLevels (StorageSet const &stortage, std::vector< int > const &levels) |
Overload that operates on an entire StorageSet structure set. | |
Data2D<int> TasGrid::HierarchyManipulations::computeDAGup | ( | MultiIndexSet const & | mset | ) |
Cache the indexes slot numbers of the parents of the multi-indexes in mset.
Each node defined by a multi-index in mset can have one or more parents in each direction, where the parent-offspring relation is defined by the rule. For each index in mset, the Data2D structure parents will hold a strip with the location of each parent in mset (or -1 if the parent is missing from mset).
Data2D<int> TasGrid::HierarchyManipulations::computeDAGup | ( | MultiIndexSet const & | mset, |
RuleLocal::erule | effrule | ||
) |
Cache the indexes slot numbers of the parents of the multi-indexes in mset.
The effective rule is passed in at runtime and a switch statement finds the correct template.
Data2D<int> TasGrid::HierarchyManipulations::computeDAGup | ( | MultiIndexSet const & | mset, |
bool & | is_complete | ||
) |
Variant that also check if all points have all parents.
This is merged together so it will do only one pass over the data.
On exit, is_complete will indicate whether there are points with missing parents.
Data2D<int> TasGrid::HierarchyManipulations::computeDAGDown | ( | MultiIndexSet const & | mset | ) |
Cache the indexes slot numbers of the children of the multi-indexes in mset.
Each node defined by a multi-index in mset can have one or more children in each direction, where the parent-offspring relation is defined by the rule. For each index in mset, the returned Data2D structure will hold a strip with the location of each child in mset (or -1 if the kid is missing from mset).
std::vector<int> TasGrid::HierarchyManipulations::computeLevels | ( | MultiIndexSet const & | mset | ) |
Returns a vector that is the sum of the one dimensional levels of each multi-index in the set..
std::vector<int> TasGrid::HierarchyManipulations::computeLevels | ( | MultiIndexSet const & | mset, |
RuleLocal::erule | effrule | ||
) |
Overload that turns switch statement into template instantiations.
void TasGrid::HierarchyManipulations::completeToLower | ( | MultiIndexSet const & | mset, |
MultiIndexSet & | refined | ||
) |
Complete refined so that the union of refined and mset is lower w.r.t. the rule. .
void TasGrid::HierarchyManipulations::touchAllImmediateRelatives | ( | std::vector< int > & | point, |
MultiIndexSet const & | mset, | ||
callable_method | apply | ||
) |
Will call apply() with the slot index in mset of each parent/child of point..
MultiIndexSet TasGrid::HierarchyManipulations::getLevelZeroPoints | ( | size_t | num_dimensions | ) |
Return the tensor set of all points that sit on level zero (i.e., have no parents).
MultiIndexSet TasGrid::HierarchyManipulations::getLargestConnected | ( | MultiIndexSet const & | current, |
MultiIndexSet const & | candidates | ||
) |
Return the largest subset of candidates such that adding it to current will result in a connected graph.
std::vector<Data2D<T> > TasGrid::HierarchyManipulations::splitByLevels | ( | size_t | stride, |
typename std::vector< T >::const_iterator | ibegin, | ||
typename std::vector< T >::const_iterator | iend, | ||
std::vector< int >::const_iterator | ilevels | ||
) |
Split the range between ibegin and iend into strips of stride and orders those by levels according to the level index in ilevels.