SG++-Doxygen-Documentation
Loading...
Searching...
No Matches
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.
 
void addNeighbor (size_t neighbor, size_t dim, bool isLeft)
 Adds the information for a found neighbor to the point.
 
std::vector< std::tuple< size_t, size_t, bool > > getBorders () const
 Gets the list of all Boundaries.
 
double getBorderScore () const
 Scores the boundaries dependent on the level.
 
double getDensity (size_t classId) const
 Get the density of the class at this point.
 
size_t getDominateClass () const
 Get the index of the class with the highest denstity at this point.
 
std::vector< std::tuple< size_t, size_t, bool > > getNeighbors () const
 Gets the list of all Neighbors.
 
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.
 
bool isClassSet (size_t classId) const
 Checks if a point exits in the sparse grid of the given class.
 
 MultipleClassPoint (base::HashGridPoint &gp, std::vector< base::Grid * > grids, std::vector< base::DataVector * > alphas)
 Constructor.
 
void resortClasses ()
 Sorts the classes by the densities.
 
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 level.

◆ 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

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

◆ 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

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

◆ 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()(), and sgpp::base::MultipleClassRefinement::refineGridpoint().

◆ 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()(), and sgpp::base::MultipleClassRefinement::refineGridpoint().

◆ getNeighbors()

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

Gets the list of all Neighbors.

Returns
The list of all neigbors

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

◆ 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

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

◆ 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

◆ resortClasses()

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

Sorts the classes by the densities.


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