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

A feature matrix where vectors are dense vectors in a fixed dimension. More...

#include <dense.hpp>

Inheritance diagram for kqp::Dense< Scalar >:
kqp::FeatureMatrixBase< Scalar >

Public Types

typedef Dense< Scalar > Self
 

Public Member Functions

 KQP_SPACE_TYPEDEFS ("dense", Scalar)
 
 Dense ()
 Null constructor: will set the dimension with the first feature vector.
 
 Dense (Index dimension)
 Construct an empty feature matrix of a given dimension.
 
 Dense (const ScalarMatrix &m)
 Construction by copying a dense matrix.
 
 Dense (const Self &other)
 Copy constructor.
 
 Dense (ScalarMatrix &&m)
 Construction by copying a dense matrix.
 
template<typename Derived >
void add (const Eigen::DenseBase< Derived > &m, const std::vector< bool > *which=NULL)
 
const ScalarMatrix & getMatrix () const
 Get a const reference to the m_matrix.
 
const ScalarMatrix & toDense () const
 
void add (const FMatrixBase &other, const std::vector< bool > *which=NULL) override
 
virtual Index size () const override
 
Index dimension () const
 
const ScalarMatrix & gramMatrix () const
 Returns the Gram matrix.
 
template<class DerivedMatrix >
void _inner (const Self &other, DerivedMatrix &result) const
 Computes the inner product with another m_matrix.
 
FMatrixBasePtr linearCombination (const ScalarAltMatrix &mA, Scalar alpha, const Self *mY, const ScalarAltMatrix *mB, Scalar beta) const override
 
FMatrixBasePtr subset (const std::vector< bool >::const_iterator &begin, const std::vector< bool >::const_iterator &end) const override
 Reduces the feature matrix to a subset of its vectors.
 
virtual FMatrixBasePtr copy () const override
 
Selfoperator= (const Self &other)
 
virtual FMatrixBase & operator= (const FMatrixBase &other) override
 
const ScalarMatrix * operator-> () const
 
const ScalarMatrix & operator* () const
 
- Public Member Functions inherited from kqp::FeatureMatrixBase< Scalar >
 KQP_SCALAR_TYPEDEFS (Scalar)
 
FMatrixPtr subset (const std::vector< bool > &list) const
 Reduces the feature matrix to a subset of its vectors.
 
virtual FMatrixBase & operator= (const FeatureMatrixBase< Scalar > &other)=0
 
template<typename T >
const T & as () const
 
template<typename T >
T & as ()
 
void add (const FMatrixCPtr &f, const std::vector< bool > *which=NULL)
 

Static Public Member Functions

static SelfPtr create (Index dimension)
 
static FMatrixPtr create (const ScalarMatrix &m)
 Creates from a matrix.
 
static FMatrixPtr create (const ScalarMatrix &&m)
 Creates from a matrix.
 
static const Selfcast (const FMatrixBase &m)
 

Friends

class DenseSpace< Scalar >
 

Detailed Description

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

A feature matrix where vectors are dense vectors in a fixed dimension.

Member Function Documentation

template<typename Scalar>
template<typename Derived >
void kqp::Dense< Scalar >::add ( const Eigen::DenseBase< Derived > &  m,
const std::vector< bool > *  which = NULL 
)
inline

Add a vector (from a template expression)

template<typename Scalar>
void kqp::Dense< Scalar >::add ( const FMatrixBase &  f,
const std::vector< bool > *  which = NULL 
)
inlineoverridevirtual

Add pre-images vectors

Implements kqp::FeatureMatrixBase< Scalar >.

template<typename Scalar>
virtual FMatrixBasePtr kqp::Dense< Scalar >::copy ( ) const
inlineoverridevirtual
template<typename Scalar>
virtual Index kqp::Dense< Scalar >::size ( ) const
inlineoverridevirtual

Number of pre-image vectors

Implements kqp::FeatureMatrixBase< Scalar >.

template<typename Scalar>
FMatrixBasePtr kqp::Dense< Scalar >::subset ( const std::vector< bool >::const_iterator &  begin,
const std::vector< bool >::const_iterator &  end 
) const
inlineoverridevirtual

Reduces the feature matrix to a subset of its vectors.

The list of indices is supposed to be ordered.

Parameters
beginBeginning of the list of indices
endEnd of the list of indices

Implements kqp::FeatureMatrixBase< Scalar >.


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