SG++
sgpp::base::OperationMultipleEval Class Referenceabstract

Interface for multiplication with Matrices \(B\) and \(B^T\). More...

#include <OperationMultipleEval.hpp>

Inheritance diagram for sgpp::base::OperationMultipleEval:
sgpp::base::OperationMultipleEvalInterModLinear sgpp::base::OperationMultipleEvalLinear sgpp::base::OperationMultipleEvalLinearBoundary sgpp::base::OperationMultipleEvalLinearStretched sgpp::base::OperationMultipleEvalLinearStretchedBoundary sgpp::base::OperationMultipleEvalModLinear sgpp::base::OperationMultipleEvalModPoly sgpp::base::OperationMultipleEvalPeriodic sgpp::base::OperationMultipleEvalPoly sgpp::base::OperationMultipleEvalPolyBoundary sgpp::base::OperationMultipleEvalPrewavelet sgpp::datadriven::AbstractOperationMultipleEvalSubspace sgpp::datadriven::OperationMultiEvalCuda sgpp::datadriven::OperationMultiEvalHPX sgpp::datadriven::OperationMultiEvalModMaskStreaming sgpp::datadriven::OperationMultiEvalMPI sgpp::datadriven::OperationMultiEvalStreaming sgpp::datadriven::OperationMultiEvalStreamingBSplineOCL< T > sgpp::datadriven::OperationMultiEvalStreamingModOCLFastMultiPlatform< T > sgpp::datadriven::OperationMultiEvalStreamingModOCLMaskMultiPlatform< T > sgpp::datadriven::OperationMultiEvalStreamingModOCLOpt< T > sgpp::datadriven::OperationMultiEvalStreamingModOCLUnified< T > sgpp::datadriven::StreamingOCLMultiPlatform::OperationMultiEvalStreamingOCLMultiPlatform< T >

Public Member Functions

void eval (DataVector &alpha, DataVector &result)
 Evaluate multiple datapoints with the specified grid. More...
 
virtual double getDuration ()=0
 
virtual std::string getImplementationName ()
 Name of this implementation of the operation. More...
 
virtual void mult (DataVector &alpha, DataVector &result)=0
 Multiplication of \(B^T\) with vector \(\alpha\). More...
 
virtual void mult (DataVector &alpha, DataVector &result, size_t startIndexData, size_t endIndexData)
 Multiplication of \(B^T\) with vector \(\alpha\). More...
 
virtual void multTranspose (DataVector &source, DataVector &result)=0
 Multiplication of \(B\) with vector \(\alpha\). More...
 
virtual void multTranspose (DataVector &source, DataVector &result, size_t startIndexGrid, size_t endIndexGrid)
 Multiplication of \(B\) with vector \(\alpha\). More...
 
 OperationMultipleEval (sgpp::base::Grid &grid, DataMatrix &dataset)
 Constructor. More...
 
virtual void prepare ()
 Used for kernel-specific setup like special data structures that are defined from the current state of the grid. More...
 
virtual ~OperationMultipleEval ()
 Destructor. More...
 

Protected Attributes

DataMatrixdataset
 
Gridgrid
 
bool isPrepared
 

Detailed Description

Interface for multiplication with Matrices \(B\) and \(B^T\).

If there are \(N\) basis functions, \(\{\varphi(\vec{x})\}_{i=1,\ldots,N}\) and \(m\) data points

Constructor & Destructor Documentation

sgpp::base::OperationMultipleEval::OperationMultipleEval ( sgpp::base::Grid grid,
DataMatrix dataset 
)
inline

Constructor.

Parameters
gridthe sparse grid used for this operation
datasetdata set that should be evaluated on the sparse grid, a operation may create a copy of the dataset
virtual sgpp::base::OperationMultipleEval::~OperationMultipleEval ( )
inlinevirtual

Destructor.

References alpha, and mult().

Member Function Documentation

void sgpp::base::OperationMultipleEval::eval ( DataVector alpha,
DataVector result 
)
inline

Evaluate multiple datapoints with the specified grid.

Parameters
alphasurplus vector of the grid
resultresult of the evaluations

References mult().

Referenced by python.uq.analysis.asgc.ASGCAnalysis.ASGCAnalysis::estimateDensity(), sgpp::datadriven::DBMatOnlineDE::eval(), sgpp::datadriven::ModelFittingLeastSquares::evaluate(), main(), and sgpp::datadriven::LearnerSGDE::pdf().

virtual std::string sgpp::base::OperationMultipleEval::getImplementationName ( )
inlinevirtual

Name of this implementation of the operation.

Reimplemented in sgpp::datadriven::OperationMultipleEvalSubspaceCombined, and sgpp::datadriven::OperationMultipleEvalSubspaceSimple.

virtual void sgpp::base::OperationMultipleEval::mult ( DataVector alpha,
DataVector result 
)
pure virtual

Multiplication of \(B^T\) with vector \(\alpha\).

Parameters
alphavector, to which \(B\) is applied. Typically the coefficient vector
resultthe result vector of the matrix vector multiplication

Implemented in sgpp::datadriven::StreamingOCLMultiPlatform::OperationMultiEvalStreamingOCLMultiPlatform< T >, sgpp::datadriven::OperationMultiEvalStreamingModOCLOpt< T >, sgpp::datadriven::OperationMultiEvalStreamingModOCLMaskMultiPlatform< T >, sgpp::datadriven::OperationMultiEvalStreamingModOCLFastMultiPlatform< T >, sgpp::datadriven::OperationMultiEvalStreamingModOCLUnified< T >, sgpp::datadriven::OperationMultiEvalStreamingBSplineOCL< T >, sgpp::datadriven::AbstractOperationMultipleEvalSubspace, sgpp::datadriven::OperationMultiEvalCuda, sgpp::datadriven::OperationMultiEvalModMaskStreaming, sgpp::base::OperationMultipleEvalInterModLinear, sgpp::datadriven::OperationMultiEvalStreaming, sgpp::datadriven::OperationMultiEvalHPX, sgpp::datadriven::OperationMultiEvalMPI, sgpp::base::OperationMultipleEvalLinearStretchedBoundary, sgpp::base::OperationMultipleEvalModPoly, sgpp::base::OperationMultipleEvalLinearBoundary, sgpp::base::OperationMultipleEvalPeriodic, sgpp::base::OperationMultipleEvalPoly, sgpp::base::OperationMultipleEvalPolyBoundary, sgpp::base::OperationMultipleEvalLinearStretched, sgpp::base::OperationMultipleEvalModLinear, sgpp::base::OperationMultipleEvalPrewavelet, and sgpp::base::OperationMultipleEvalLinear.

Referenced by sgpp::base::OperationQuadratureMC::doQuadrature(), sgpp::quadrature::OperationQuadratureMCAdvanced::doQuadrature(), sgpp::datadriven::OperationDensityRejectionSamplingLinear::doSampling(), eval(), hpx_main(), main(), sgpp::datadriven::DMWeightMatrix::mult(), sgpp::datadriven::MultipleEvalHPX::LocalityMultiplier::mult(), sgpp::datadriven::OperationMultiEvalMPI::multSlave(), sgpp::datadriven::LearnerLeastSquaresIdentity::multTranspose(), sgpp::datadriven::LearnerLeastSquaresIdentity::predict(), sgpp::datadriven::LearnerBaseSP::predict(), sgpp::datadriven::LearnerBase::predict(), sgpp::solver::Fista< F >::solve(), sgpp::datadriven::LearnerLeastSquaresIdentity::testRegular(), and ~OperationMultipleEval().

virtual void sgpp::base::OperationMultipleEval::mult ( DataVector alpha,
DataVector result,
size_t  startIndexData,
size_t  endIndexData 
)
inlinevirtual

Multiplication of \(B^T\) with vector \(\alpha\).

This implementation variant produces a partial result passed on the start and end index provided. Not every MultiEval operation implements this method, as it only useful for distributed algorithms.

Parameters
alphavector, to which \(B\) is applied. Typically the coefficient vector
resultthe result vector of the matrix vector multiplication
startIndexDatabegin of the fragment of the dataset to be evaluated
endIndexDataend of the fragment of the dataset to be evaluated
Returns
The results of the evaluation for the specified range of the dataset

Reimplemented in sgpp::datadriven::StreamingOCLMultiPlatform::OperationMultiEvalStreamingOCLMultiPlatform< T >.

References multTranspose().

virtual void sgpp::base::OperationMultipleEval::multTranspose ( DataVector source,
DataVector result 
)
pure virtual

Multiplication of \(B\) with vector \(\alpha\).

Parameters
sourcevector, to which \(B^T\) is applied. Typically the coefficient vector
resultthe result vector of the matrix vector multiplication

Implemented in sgpp::datadriven::StreamingOCLMultiPlatform::OperationMultiEvalStreamingOCLMultiPlatform< T >, sgpp::datadriven::OperationMultiEvalStreamingModOCLMaskMultiPlatform< T >, sgpp::datadriven::OperationMultiEvalStreamingModOCLOpt< T >, sgpp::datadriven::OperationMultiEvalStreamingModOCLFastMultiPlatform< T >, sgpp::datadriven::OperationMultiEvalStreamingModOCLUnified< T >, sgpp::datadriven::OperationMultiEvalStreamingBSplineOCL< T >, sgpp::datadriven::OperationMultiEvalCuda, sgpp::datadriven::OperationMultiEvalModMaskStreaming, sgpp::base::OperationMultipleEvalInterModLinear, sgpp::datadriven::OperationMultiEvalStreaming, sgpp::datadriven::OperationMultiEvalMPI, sgpp::datadriven::OperationMultiEvalHPX, sgpp::base::OperationMultipleEvalLinearStretchedBoundary, sgpp::base::OperationMultipleEvalModPoly, sgpp::base::OperationMultipleEvalLinearBoundary, sgpp::base::OperationMultipleEvalPeriodic, sgpp::base::OperationMultipleEvalPoly, sgpp::base::OperationMultipleEvalPolyBoundary, sgpp::datadriven::AbstractOperationMultipleEvalSubspace, sgpp::base::OperationMultipleEvalLinearStretched, sgpp::base::OperationMultipleEvalModLinear, sgpp::base::OperationMultipleEvalPrewavelet, and sgpp::base::OperationMultipleEvalLinear.

Referenced by sgpp::datadriven::DBMatOnlineDE::computeDensityFunction(), sgpp::datadriven::DMWeightMatrix::generateb(), main(), sgpp::datadriven::DMWeightMatrix::mult(), mult(), sgpp::datadriven::LearnerBase::multTranspose(), and sgpp::solver::Fista< F >::solve().

virtual void sgpp::base::OperationMultipleEval::multTranspose ( DataVector source,
DataVector result,
size_t  startIndexGrid,
size_t  endIndexGrid 
)
inlinevirtual

Multiplication of \(B\) with vector \(\alpha\).

This implementation variant produces a partial result passed on the start and end index provided. Not every MultiEval operation implements this method, as it only useful for distributed algorithms.

Parameters
sourcevector, to which \(B^T\) is applied. Typically the coefficient vector
resultthe result vector of the matrix vector multiplication
startIndexGridbegin of the fragment of the grid to apply the operator to
endIndexGridend of the fragment of the grid to be apply the operator to
Returns
The results of the evaluation for the specified range of the dataset

Reimplemented in sgpp::datadriven::StreamingOCLMultiPlatform::OperationMultiEvalStreamingOCLMultiPlatform< T >.

Member Data Documentation

DataMatrix& sgpp::base::OperationMultipleEval::dataset
protected

Referenced by sgpp::datadriven::AbstractOperationMultipleEvalSubspace::getPaddedDatasetSize(), sgpp::base::OperationMultipleEvalLinear::mult(), sgpp::base::OperationMultipleEvalModLinear::mult(), sgpp::base::OperationMultipleEvalPrewavelet::mult(), sgpp::base::OperationMultipleEvalLinearStretched::mult(), sgpp::base::OperationMultipleEvalPoly::mult(), sgpp::base::OperationMultipleEvalPolyBoundary::mult(), sgpp::base::OperationMultipleEvalLinearBoundary::mult(), sgpp::base::OperationMultipleEvalPeriodic::mult(), sgpp::base::OperationMultipleEvalLinearStretchedBoundary::mult(), sgpp::base::OperationMultipleEvalModPoly::mult(), sgpp::datadriven::OperationMultiEvalHPX::mult(), sgpp::datadriven::OperationMultiEvalMPI::mult(), sgpp::base::OperationMultipleEvalInterModLinear::mult(), sgpp::datadriven::OperationMultipleEvalSubspaceSimple::multImpl(), sgpp::datadriven::OperationMultiEvalMPI::multSlave(), sgpp::base::OperationMultipleEvalLinear::multTranspose(), sgpp::base::OperationMultipleEvalLinearStretched::multTranspose(), sgpp::base::OperationMultipleEvalPrewavelet::multTranspose(), sgpp::base::OperationMultipleEvalModLinear::multTranspose(), sgpp::base::OperationMultipleEvalPeriodic::multTranspose(), sgpp::base::OperationMultipleEvalPoly::multTranspose(), sgpp::base::OperationMultipleEvalPolyBoundary::multTranspose(), sgpp::base::OperationMultipleEvalLinearBoundary::multTranspose(), sgpp::base::OperationMultipleEvalLinearStretchedBoundary::multTranspose(), sgpp::base::OperationMultipleEvalModPoly::multTranspose(), sgpp::datadriven::OperationMultiEvalStreaming::multTranspose(), sgpp::base::OperationMultipleEvalInterModLinear::multTranspose(), sgpp::datadriven::OperationMultiEvalModMaskStreaming::multTranspose(), sgpp::datadriven::OperationMultipleEvalSubspaceSimple::multTransposeImpl(), sgpp::datadriven::OperationMultipleEvalSubspaceCombined::padDataset(), sgpp::datadriven::OperationMultiEvalCuda::prepare(), sgpp::datadriven::OperationMultiEvalStreamingBSplineOCL< T >::prepare(), sgpp::datadriven::OperationMultiEvalStreamingModOCLUnified< T >::prepare(), sgpp::datadriven::OperationMultiEvalStreamingModOCLFastMultiPlatform< T >::prepare(), sgpp::datadriven::OperationMultiEvalStreamingModOCLOpt< T >::prepare(), sgpp::datadriven::OperationMultiEvalStreamingModOCLMaskMultiPlatform< T >::prepare(), and sgpp::datadriven::StreamingOCLMultiPlatform::OperationMultiEvalStreamingOCLMultiPlatform< T >::prepare().

Grid& sgpp::base::OperationMultipleEval::grid
protected

Referenced by python.learner.Learner.Learner::applyData(), python.uq.learner.Interpolant.Interpolant::doLearningIteration(), python.learner.Learner.Learner::doLearningIteration(), python.learner.Classifier.Classifier::evalError(), python.uq.learner.Interpolant.Interpolant::evalError(), python.controller.CheckpointController.CheckpointController::generateFoldValidationJob(), python.uq.learner.SimulationLearner.SimulationLearner::getGrid(), python.uq.learner.Regressor.Regressor::learnData(), python.learner.Learner.Learner::learnData(), python.uq.learner.Regressor.Regressor::learnDataWithFolding(), python.learner.Learner.Learner::learnDataWithFolding(), python.uq.learner.Regressor.Regressor::learnDataWithTest(), python.learner.Learner.Learner::learnDataWithTest(), python.controller.CheckpointController.CheckpointController::loadAll(), python.uq.operations.forcePositivity.operationMakePositive.OperationMakePositive::makePositive(), python.uq.operations.forcePositivity.operationMakePositiveFast.OperationMakePositiveFast::makePositive(), sgpp::datadriven::OperationMultiEvalHPX::mult(), sgpp::datadriven::OperationMultiEvalMPI::multSlave(), sgpp::datadriven::OperationMultiEvalStreamingBSplineOCL< T >::OperationMultiEvalStreamingBSplineOCL(), sgpp::datadriven::OperationMultiEvalCuda::prepare(), sgpp::datadriven::OperationMultiEvalStreamingModOCLUnified< T >::prepare(), sgpp::datadriven::OperationMultiEvalStreamingModOCLFastMultiPlatform< T >::prepare(), sgpp::datadriven::OperationMultiEvalStreamingModOCLOpt< T >::prepare(), sgpp::datadriven::StreamingOCLMultiPlatform::OperationMultiEvalStreamingOCLMultiPlatform< T >::prepare(), python.controller.CheckpointController.CheckpointController::setGrid(), python.uq.learner.Learner.Learner::setGrid(), python.learner.Learner.Learner::setGrid(), and python.uq.operations.forcePositivity.localFullGridSearch.LocalFullGrid::split().


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