SG++-Doxygen-Documentation
sgpp::datadriven::OperationMakePositiveCandidateSetAlgorithm Class Referenceabstract

#include <OperationMakePositiveCandidateSetAlgorithm.hpp>

Inheritance diagram for sgpp::datadriven::OperationMakePositiveCandidateSetAlgorithm:
sgpp::datadriven::OperationMakePositiveFindIntersectionCandidates sgpp::datadriven::OperationMakePositiveLoadFullGridCandidates sgpp::datadriven::OperationMakePositiveFindIntersectionCandidatesJoin sgpp::datadriven::OperationMakePositiveHybridFindIntersectionCandidates

Public Member Functions

size_t costsComputingCandidates ()
 
base::DataVectorcostsComputingCandidatesPerIteration ()
 
virtual void nextCandidates (base::Grid &grid, base::DataVector &alpha, size_t levelSum, std::vector< std::shared_ptr< base::HashGridPoint >> &candidates)=0
 Load the next candidate set that contains grid points with the currently explored levelsum. More...
 
virtual size_t numCandidates ()=0
 
virtual base::DataVectornumCandidatesPerIteration ()=0
 
base::DataVectornumCandidatesPerLevel ()
 
 OperationMakePositiveCandidateSetAlgorithm (size_t maxLevel)
 Constructor. More...
 
void setVerbose (bool pverbose)
 Set verbosity level. More...
 
virtual ~OperationMakePositiveCandidateSetAlgorithm ()
 Desctructor. More...
 

Protected Member Functions

void findNodesWithNegativeCoefficients (base::DataVector &alpha, std::vector< size_t > &negativeGridPoints, double tol=-1e-14)
 Extract grid points with negative coefficient. More...
 

Protected Attributes

base::DataVector costsPerIteration
 comparison costs per iteration More...
 
base::DataVector gridPointsPerLevel
 candiddate grid points per level More...
 
size_t iteration
 iteration counter More...
 
size_t maxLevel
 maximum full grid level for the candidate set More...
 
bool verbose
 verbosity level More...
 

Constructor & Destructor Documentation

sgpp::datadriven::OperationMakePositiveCandidateSetAlgorithm::OperationMakePositiveCandidateSetAlgorithm ( size_t  maxLevel)
explicit

Constructor.

Parameters
maxLevelmaximum level for candidate set
sgpp::datadriven::OperationMakePositiveCandidateSetAlgorithm::~OperationMakePositiveCandidateSetAlgorithm ( )
virtual

Desctructor.

Member Function Documentation

size_t sgpp::datadriven::OperationMakePositiveCandidateSetAlgorithm::costsComputingCandidates ( )
Returns
number of comparisons that have been computed in total

References costsPerIteration, and sgpp::base::DataVector::sum().

base::DataVector & sgpp::datadriven::OperationMakePositiveCandidateSetAlgorithm::costsComputingCandidatesPerIteration ( )
Returns
number of comparisons that have been computed per iteration

References costsPerIteration.

void sgpp::datadriven::OperationMakePositiveCandidateSetAlgorithm::findNodesWithNegativeCoefficients ( base::DataVector alpha,
std::vector< size_t > &  negativeGridPoints,
double  tol = -1e-14 
)
protected

Extract grid points with negative coefficient.

Parameters
alphacoefficient vector
negativeGridPointsvector that contains the indices of the grid points with negative coefficient
toltolerance for positivity

References sgpp::base::DataVector::getSize(), and python.statsfileInfo::i.

Referenced by sgpp::datadriven::OperationMakePositiveFindIntersectionCandidates::nextCandidates(), and sgpp::datadriven::OperationMakePositiveHybridFindIntersectionCandidates::nextCandidates().

virtual void sgpp::datadriven::OperationMakePositiveCandidateSetAlgorithm::nextCandidates ( base::Grid grid,
base::DataVector alpha,
size_t  levelSum,
std::vector< std::shared_ptr< base::HashGridPoint >> &  candidates 
)
pure virtual

Load the next candidate set that contains grid points with the currently explored levelsum.

Parameters
gridcurrent sparse grid that needs to be extended
alphacorresponding coefficient vector
levelSumcurrent levelsum to be explored
candidatesvector that contains the candidate set for the current levelsum

Implemented in sgpp::datadriven::OperationMakePositiveHybridFindIntersectionCandidates, sgpp::datadriven::OperationMakePositiveLoadFullGridCandidates, and sgpp::datadriven::OperationMakePositiveFindIntersectionCandidates.

virtual size_t sgpp::datadriven::OperationMakePositiveCandidateSetAlgorithm::numCandidates ( )
pure virtual
virtual base::DataVector& sgpp::datadriven::OperationMakePositiveCandidateSetAlgorithm::numCandidatesPerIteration ( )
pure virtual
Returns
number of candidates that have been computed per iteration

Implemented in sgpp::datadriven::OperationMakePositiveLoadFullGridCandidates, and sgpp::datadriven::OperationMakePositiveFindIntersectionCandidates.

base::DataVector & sgpp::datadriven::OperationMakePositiveCandidateSetAlgorithm::numCandidatesPerLevel ( )
Returns
number of candidates that have been computed per levelsum

References gridPointsPerLevel.

void sgpp::datadriven::OperationMakePositiveCandidateSetAlgorithm::setVerbose ( bool  pverbose)

Set verbosity level.

Parameters
pverboseverbosity level

References verbose.

Member Data Documentation

base::DataVector sgpp::datadriven::OperationMakePositiveCandidateSetAlgorithm::gridPointsPerLevel
protected

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