Kernel Quantum Probability Library
The KQP library aims at providing tools for working with quantums probabilities
Public Member Functions | Protected Member Functions
kqp::DivideAndConquerBuilder< Scalar > Class Template Reference

Meta builder: Uses other operator builders and combine them at regular intervals. More...

#include <divide_and_conquer.hpp>

Inheritance diagram for kqp::DivideAndConquerBuilder< Scalar >:
kqp::KernelEVD< Scalar > kqp::KernelEVDBase

Public Member Functions

 KQP_SCALAR_TYPEDEFS (Scalar)
 
 DivideAndConquerBuilder (const FSpaceCPtr &fs)
 
void setBatchSize (Index batchSize)
 Set the maximum number of rank updates before using a combiner.
 
void setBuilder (const boost::shared_ptr< KernelEVD< Scalar > > &builder)
 Sets the builder.
 
void setBuilderCleaner (const boost::shared_ptr< Cleaner< Scalar > > &builderCleaner)
 Sets the builder cleaner.
 
void setMerger (const boost::shared_ptr< KernelEVD< Scalar > > &merger)
 Sets the merger.
 
void setMergerCleaner (const boost::shared_ptr< Cleaner< Scalar > > &mergerCleaner)
 Sets the merger cleaner.
 
- Public Member Functions inherited from kqp::KernelEVD< Scalar >
 KQP_SCALAR_TYPEDEFS (Scalar)
 
 KernelEVD (const FSpaceCPtr &featureSpace)
 
virtual void add (Real alpha, const FMatrixCPtr &mX, const ScalarAltMatrix &mA)
 Rank-n update.
 
void add (const FMatrixCPtr &mU)
 Rank-n update.
 
Decomposition< Scalar > getDecomposition () const
 
Index getUpdateCount () const
 Return the number of updates.
 
const FSpaceCPtr & getFSpace () const
 

Protected Member Functions

void reset ()
 Resets the state of the builder.
 
virtual Decomposition< Scalar > _getDecomposition () const override
 
virtual void _add (Real alpha, const FMatrixCPtr &mU, const ScalarAltMatrix &mA) override
 Rank-n update.
 

Detailed Description

template<typename Scalar>
class kqp::DivideAndConquerBuilder< Scalar >

Meta builder: Uses other operator builders and combine them at regular intervals.

Member Function Documentation

template<typename Scalar >
virtual void kqp::DivideAndConquerBuilder< Scalar >::_add ( Real  alpha,
const FMatrixCPtr &  mU,
const ScalarAltMatrix &  mA 
)
inlineoverrideprotectedvirtual

Rank-n update.

Updates the current decomposition to \(A^\prime \approx A + \alpha X A A^T X^\top\)

Parameters
alphaThe coefficient for the update
mXThe feature matrix X with n feature vectors.
mAThe mixture matrix (of dimensions n x k).

Implements kqp::KernelEVD< Scalar >.

template<typename Scalar >
virtual Decomposition<Scalar> kqp::DivideAndConquerBuilder< Scalar >::_getDecomposition ( ) const
inlineoverrideprotectedvirtual

Get the decomposition

Implements kqp::KernelEVD< Scalar >.


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