SG++-Doxygen-Documentation
|
Multiple Class Point provides a structure to save additional data for each GridPoint in a Sparse Grid. More...
#include <MultipleClassPoint.hpp>
Public Member Functions | |
void | addBorder (size_t dim, size_t level, bool isLeft) |
Adds the information for a found boundary to the point. More... | |
void | addNeighbor (size_t neighbor, size_t dim, bool isLeft) |
Adds the information for a found neighbor to the point. More... | |
std::vector< std::tuple< size_t, size_t, bool > > | getBorders () const |
Gets the list of all Boundaries. More... | |
double | getBorderScore () const |
Scores the boundaries dependent on the level. More... | |
double | getDensity (size_t classId) const |
Get the density of the class at this point. More... | |
size_t | getDominateClass () const |
Get the index of the class with the highest denstity at this point. More... | |
std::vector< std::tuple< size_t, size_t, bool > > | getNeighbors () const |
Gets the list of all Neighbors. More... | |
std::vector< std::tuple< double, size_t, bool > > | getTopClasses (double percent) const |
Gets all classes with a density in the range of percent to the dominating class. More... | |
bool | isClassSet (size_t classId) const |
Checks if a point exits in the sparse grid of the given class. More... | |
MultipleClassPoint (base::HashGridPoint &gp, std::vector< base::Grid *> grids, std::vector< base::DataVector *> alphas) | |
Constructor. More... | |
void | resortClasses () |
Sorts the classes by the densities. More... | |
virtual | ~MultipleClassPoint () |
Multiple Class Point provides a structure to save additional data for each GridPoint in a Sparse Grid.
The Multiple Class Point is used by the MultipleClassRefinementFunctor to provide the needed data.
sgpp::base::MultipleClassPoint::MultipleClassPoint | ( | base::HashGridPoint & | gp, |
std::vector< base::Grid *> | grids, | ||
std::vector< base::DataVector *> | alphas | ||
) |
Constructor.
gp | GridPoint the MultipleClassPoint is associated with |
grids | Vector of grids |
alphas | Vector of surpluses related to the grids |
References sgpp::op_factory::createOperationEval(), and sgpp::base::HashGridPoint::getStandardCoordinates().
|
inlinevirtual |
void sgpp::base::MultipleClassPoint::addBorder | ( | size_t | dim, |
size_t | level, | ||
bool | isLeft | ||
) |
Adds the information for a found boundary to the point.
dim | the dimensions of the boundary |
level | the level of the point in given dimension |
isLeft | the direction of the boundary |
References chess::b, chess::dim, and level.
Referenced by ~MultipleClassPoint().
void sgpp::base::MultipleClassPoint::addNeighbor | ( | size_t | neighbor, |
size_t | dim, | ||
bool | isLeft | ||
) |
Adds the information for a found neighbor to the point.
neighbor | the index of the neighbor |
dim | the dimensions of the neighbor |
isLeft | the direction of the neighbor |
References chess::dim.
Referenced by ~MultipleClassPoint().
std::vector< std::tuple< size_t, size_t, bool > > sgpp::base::MultipleClassPoint::getBorders | ( | ) | const |
Gets the list of all Boundaries.
Referenced by sgpp::base::MultipleClassRefinement::refineGridpoint(), and ~MultipleClassPoint().
double sgpp::base::MultipleClassPoint::getBorderScore | ( | ) | const |
Scores the boundaries dependent on the level.
References python.statsfileInfo::i, and sgpp::combigrid::pow().
Referenced by sgpp::datadriven::MultipleClassRefinementFunctor::operator()(), sgpp::base::MultipleClassRefinement::refineGridpoint(), and ~MultipleClassPoint().
double sgpp::base::MultipleClassPoint::getDensity | ( | size_t | classId | ) | const |
Get the density of the class at this point.
classId | the index of the class |
Referenced by sgpp::datadriven::MultipleClassRefinementFunctor::operator()(), sgpp::base::MultipleClassRefinement::refineGridpoint(), and ~MultipleClassPoint().
size_t sgpp::base::MultipleClassPoint::getDominateClass | ( | ) | const |
Get the index of the class with the highest denstity at this point.
Referenced by sgpp::datadriven::MultipleClassRefinementFunctor::operator()(), sgpp::base::MultipleClassRefinement::refineGridpoint(), and ~MultipleClassPoint().
std::vector< std::tuple< size_t, size_t, bool > > sgpp::base::MultipleClassPoint::getNeighbors | ( | ) | const |
Gets the list of all Neighbors.
Referenced by sgpp::datadriven::MultipleClassRefinementFunctor::operator()(), sgpp::base::MultipleClassRefinement::refineGridpoint(), and ~MultipleClassPoint().
std::vector< std::tuple< double, size_t, bool > > sgpp::base::MultipleClassPoint::getTopClasses | ( | double | percent | ) | const |
Gets all classes with a density in the range of percent to the dominating class.
percent | the range in which to return the classes |
References python.statsfileInfo::i, and python.leja::lower_bound.
Referenced by sgpp::datadriven::MultipleClassRefinementFunctor::operator()(), sgpp::base::MultipleClassRefinement::refineGridpoint(), and ~MultipleClassPoint().
bool sgpp::base::MultipleClassPoint::isClassSet | ( | size_t | classId | ) | const |
Checks if a point exits in the sparse grid of the given class.
classId | the index of the class to check for |
Referenced by ~MultipleClassPoint().
void sgpp::base::MultipleClassPoint::resortClasses | ( | ) |
Sorts the classes by the densities.
Referenced by ~MultipleClassPoint().