SG++-Doxygen-Documentation
sgpp::base::MultipleClassPoint Class Reference

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 ()
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ MultipleClassPoint()

sgpp::base::MultipleClassPoint::MultipleClassPoint ( base::HashGridPoint gp,
std::vector< base::Grid *>  grids,
std::vector< base::DataVector *>  alphas 
)

Constructor.

Parameters
gpGridPoint the MultipleClassPoint is associated with
gridsVector of grids
alphasVector of surpluses related to the grids

References sgpp::op_factory::createOperationEval(), and sgpp::base::HashGridPoint::getStandardCoordinates().

◆ ~MultipleClassPoint()

virtual sgpp::base::MultipleClassPoint::~MultipleClassPoint ( )
inlinevirtual

Member Function Documentation

◆ addBorder()

void sgpp::base::MultipleClassPoint::addBorder ( size_t  dim,
size_t  level,
bool  isLeft 
)

Adds the information for a found boundary to the point.

Parameters
dimthe dimensions of the boundary
levelthe level of the point in given dimension
isLeftthe direction of the boundary

References chess::b, chess::dim, and level.

Referenced by ~MultipleClassPoint().

◆ addNeighbor()

void sgpp::base::MultipleClassPoint::addNeighbor ( size_t  neighbor,
size_t  dim,
bool  isLeft 
)

Adds the information for a found neighbor to the point.

Parameters
neighborthe index of the neighbor
dimthe dimensions of the neighbor
isLeftthe direction of the neighbor

References chess::dim.

Referenced by ~MultipleClassPoint().

◆ getBorders()

std::vector< std::tuple< size_t, size_t, bool > > sgpp::base::MultipleClassPoint::getBorders ( ) const

Gets the list of all Boundaries.

Returns
The list of all boundaries

Referenced by sgpp::base::MultipleClassRefinement::refineGridpoint(), and ~MultipleClassPoint().

◆ getBorderScore()

double sgpp::base::MultipleClassPoint::getBorderScore ( ) const

Scores the boundaries dependent on the level.

Returns
A score based on the distance to the boundaries of the domain

References python.statsfileInfo::i, and sgpp::combigrid::pow().

Referenced by sgpp::datadriven::MultipleClassRefinementFunctor::operator()(), sgpp::base::MultipleClassRefinement::refineGridpoint(), and ~MultipleClassPoint().

◆ getDensity()

double sgpp::base::MultipleClassPoint::getDensity ( size_t  classId) const

Get the density of the class at this point.

Parameters
classIdthe index of the class
Returns
the density of the class with given index

Referenced by sgpp::datadriven::MultipleClassRefinementFunctor::operator()(), sgpp::base::MultipleClassRefinement::refineGridpoint(), and ~MultipleClassPoint().

◆ getDominateClass()

size_t sgpp::base::MultipleClassPoint::getDominateClass ( ) const

Get the index of the class with the highest denstity at this point.

Returns
the index of the doinating class

Referenced by sgpp::datadriven::MultipleClassRefinementFunctor::operator()(), sgpp::base::MultipleClassRefinement::refineGridpoint(), and ~MultipleClassPoint().

◆ getNeighbors()

std::vector< std::tuple< size_t, size_t, bool > > sgpp::base::MultipleClassPoint::getNeighbors ( ) const

◆ getTopClasses()

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.

Parameters
percentthe range in which to return the classes
Returns
list of calees with their densities

References python.statsfileInfo::i, and python.leja::lower_bound.

Referenced by sgpp::datadriven::MultipleClassRefinementFunctor::operator()(), sgpp::base::MultipleClassRefinement::refineGridpoint(), and ~MultipleClassPoint().

◆ isClassSet()

bool sgpp::base::MultipleClassPoint::isClassSet ( size_t  classId) const

Checks if a point exits in the sparse grid of the given class.

Parameters
classIdthe index of the class to check for
Returns
true, if point exists in grid with index classId

Referenced by ~MultipleClassPoint().

◆ resortClasses()

void sgpp::base::MultipleClassPoint::resortClasses ( )

Sorts the classes by the densities.

Referenced by ~MultipleClassPoint().


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