SG++
sgpp::datadriven::DBMatOfflineDenseIChol Class Reference

DBMatOfflineChol specialization that uses a parallel, iterative incomplete cholesky factorization on a dense matrix. More...

#include <DBMatOfflineDenseIChol.hpp>

Inheritance diagram for sgpp::datadriven::DBMatOfflineDenseIChol:
sgpp::datadriven::DBMatOfflineChol sgpp::datadriven::DBMatOfflineGE sgpp::datadriven::DBMatOffline

Public Member Functions

void choleskyModification (size_t newPoints, std::list< size_t > deletedPoints, double lambda) override
 Updates offline cholesky factorization based on coarsed (deletedPoints) and refined (newPoints) gridPoints. More...
 
DBMatOfflineclone () override
 Interface for the clone idiom. More...
 
 DBMatOfflineDenseIChol (const sgpp::base::RegularGridConfiguration &gridConfig, const sgpp::base::AdpativityConfiguration &adaptivityConfig, const sgpp::datadriven::RegularizationConfiguration &regularizationConfig, const sgpp::datadriven::DensityEstimationConfiguration &densityEstimationConfig)
 
 DBMatOfflineDenseIChol (const std::string &fileName)
 
void decomposeMatrix () override
 Decomposes the matrix according to the chosen decomposition type. More...
 
- Public Member Functions inherited from sgpp::datadriven::DBMatOfflineChol
 DBMatOfflineChol (const sgpp::base::RegularGridConfiguration &gridConfig, const sgpp::base::AdpativityConfiguration &adaptivityConfig, const sgpp::datadriven::RegularizationConfiguration &regularizationConfig, const sgpp::datadriven::DensityEstimationConfiguration &densityEstimationConfig)
 
 DBMatOfflineChol (const std::string &fileName)
 
bool isRefineable () override
 Only Offline objects based on Cholesky decomposition, or orthogonal adaptivity can be refined. More...
 
- Public Member Functions inherited from sgpp::datadriven::DBMatOfflineGE
void buildMatrix () override
 Builds the right hand side matrix with identity regularization term. More...
 
 DBMatOfflineGE (const sgpp::base::RegularGridConfiguration &gridConfig, const sgpp::base::AdpativityConfiguration &adaptivityConfig, const sgpp::datadriven::RegularizationConfiguration &regularizationConfig, const sgpp::datadriven::DensityEstimationConfiguration &densityEstimationConfig)
 
 DBMatOfflineGE (const std::string &fileName)
 
- Public Member Functions inherited from sgpp::datadriven::DBMatOffline
 DBMatOffline (const sgpp::base::RegularGridConfiguration &gridConfig, const sgpp::base::AdpativityConfiguration &adaptivityConfig, const sgpp::datadriven::RegularizationConfiguration &regularizationConfig, const sgpp::datadriven::DensityEstimationConfiguration &densityEstimationConfig)
 Constructor Build DBMatOffline Object from configuration. More...
 
 DBMatOffline (const std::string &fileName)
 Constructor Create offline object from serialized offline object. More...
 
 DBMatOffline (const DBMatOffline &rhs)
 Copy Constructor. More...
 
 DBMatOffline (DBMatOffline &&rhs)=default
 Default move constructor. More...
 
sgpp::base::AdpativityConfigurationgetAdaptivityConfig ()
 Get a reference to the grid adaptivity configuration object. More...
 
DataMatrixgetDecomposedMatrix ()
 Get a reference to the decomposed matrix. More...
 
sgpp::datadriven::DensityEstimationConfigurationgetDensityEstimationConfig ()
 Get a reference to the matrix decomposition configuration object. More...
 
GridgetGrid ()
 Returns a reference to the sparse grid. More...
 
sgpp::base::RegularGridConfigurationgetGridConfig ()
 Get a reference to the grid configuration object. More...
 
DataMatrixgetLhsMatrix_ONLY_FOR_TESTING ()
 Allows access to lhs matrix, which is meant ONLY FOR TESTING. More...
 
sgpp::datadriven::RegularizationConfigurationgetRegularizationConfig ()
 Get a reference to the grid regularization configuration object. More...
 
DBMatOfflineoperator= (const DBMatOffline &rhs)
 Default copy assign operator. More...
 
DBMatOfflineoperator= (DBMatOffline &&rhs)=default
 Default move assign operator. More...
 
void printMatrix ()
 Prints the matrix onto standard output. More...
 
void setInter (std::vector< std::vector< size_t >> interactions)
 Sets interaction Term. More...
 
virtual void store (const std::string &fileName)
 Serialize the DBMatOffline Object. More...
 
virtual ~DBMatOffline ()=default
 Default virtual destructor. More...
 

Static Public Member Functions

static void ichol (const DataMatrix &matrix, DataMatrix &result, size_t sweeps=4, size_t startRow=0)
 perform parlallel incomplete cholesky factorization of a matrix. More...
 

Additional Inherited Members

- Public Attributes inherited from sgpp::datadriven::DBMatOffline
std::vector< std::vector< size_t > > interactions
 
- Protected Member Functions inherited from sgpp::datadriven::DBMatOfflineChol
void choleskyAddPoint (DataVector &newCol, size_t size)
 Updates the cholesky factor when a new grid point is added (e.g. More...
 
void choleskyPermutation (size_t k, size_t l, size_t job)
 Permutes the rows of the cholesky factor based on permutations of the system matrix (e.g. More...
 
- Protected Member Functions inherited from sgpp::datadriven::DBMatOfflineGE
 DBMatOfflineGE ()
 
- Protected Member Functions inherited from sgpp::datadriven::DBMatOffline
 DBMatOffline ()
 
void InitializeGrid ()
 Build the initial sparse grid. More...
 
void parseConfig (const std::string &fileName, sgpp::base::RegularGridConfiguration &gridConfig, sgpp::base::AdpativityConfiguration &adaptivityConfig, sgpp::datadriven::RegularizationConfiguration &regularizationConfig, sgpp::datadriven::DensityEstimationConfiguration &densityEstimationConfig) const
 Read the configuration from a serialized DBMatOffline object. More...
 
void parseInter (const std::string &fileName, std::vector< std::vector< size_t >> &interactions) const
 Read the Interactionsterms from a serialized DBMatOfflibe object. More...
 
- Protected Attributes inherited from sgpp::datadriven::DBMatOffline
sgpp::base::AdpativityConfiguration adaptivityConfig
 
sgpp::datadriven::DensityEstimationConfiguration densityEstimationConfig
 
std::unique_ptr< Gridgrid
 An offline object works on a hierarchical basis grid. More...
 
sgpp::base::RegularGridConfiguration gridConfig
 
bool isConstructed
 
bool isDecomposed
 
DataMatrix lhsMatrix
 
sgpp::datadriven::RegularizationConfiguration regularizationConfig
 

Detailed Description

DBMatOfflineChol specialization that uses a parallel, iterative incomplete cholesky factorization on a dense matrix.

The current implementation is a proof of concept.

Constructor & Destructor Documentation

sgpp::datadriven::DBMatOfflineDenseIChol::DBMatOfflineDenseIChol ( const sgpp::base::RegularGridConfiguration gridConfig,
const sgpp::base::AdpativityConfiguration adaptivityConfig,
const sgpp::datadriven::RegularizationConfiguration regularizationConfig,
const sgpp::datadriven::DensityEstimationConfiguration densityEstimationConfig 
)
explicit
sgpp::datadriven::DBMatOfflineDenseIChol::DBMatOfflineDenseIChol ( const std::string &  fileName)
explicit

Member Function Documentation

void sgpp::datadriven::DBMatOfflineDenseIChol::choleskyModification ( size_t  newPoints,
std::list< size_t >  deletedPoints,
double  lambda 
)
overridevirtual

Updates offline cholesky factorization based on coarsed (deletedPoints) and refined (newPoints) gridPoints.

We ignore coarsening.

Parameters
newPointsamount of refined points
deletedPointslist of indices of last coarsed points that are ignored.
lambdathe regularization parameter

Reimplemented from sgpp::datadriven::DBMatOfflineChol.

References sgpp::datadriven::DBMatOffline::densityEstimationConfig, sgpp::base::DataMatrix::get(), sgpp::base::DataMatrix::getNrows(), sgpp::datadriven::DBMatOffline::grid, ichol(), sgpp::datadriven::DensityEstimationConfiguration::iCholSweepsRefine_, lambda, level, sgpp::datadriven::DBMatOffline::lhsMatrix, and sgpp::base::DataMatrix::set().

DBMatOffline * sgpp::datadriven::DBMatOfflineDenseIChol::clone ( )
overridevirtual

Interface for the clone idiom.

Returns
a copy of this very object as a pointer to a new DBMatOffline object which is owned by the caller.

Reimplemented from sgpp::datadriven::DBMatOfflineChol.

void sgpp::datadriven::DBMatOfflineDenseIChol::decomposeMatrix ( )
overridevirtual
void sgpp::datadriven::DBMatOfflineDenseIChol::ichol ( const DataMatrix matrix,
DataMatrix result,
size_t  sweeps = 4,
size_t  startRow = 0 
)
static

perform parlallel incomplete cholesky factorization of a matrix.

This is an out of place operation.

Parameters
matrixthe matrix to be decomposed
resultdata matrix that will hold the decomposed matrix
sweepshow many iterations of the algorithm are required until the result is good enough?
startRowon which row to start the decomposition (needed for refinement)

References sgpp::base::DataMatrix::get(), sgpp::base::DataMatrix::getNrows(), sgpp::base::DataMatrix::getSize(), and sgpp::base::DataMatrix::set().

Referenced by choleskyModification(), sgpp::datadriven::DBMatDMSDenseIChol::choleskyUpdateLambda(), and decomposeMatrix().


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