Kernel Quantum Probability Library
The KQP library aims at providing tools for working with quantums probabilities
Data Structures | Typedefs | Functions | Variables
kqp Namespace Reference

Trace related functions. More...

Data Structures

struct  scalar
 
struct  scalar< double >
 
struct  scalar< float >
 
struct  scalar< std::complex< double > >
 
struct  scalar< std::complex< float > >
 
struct  AltDiagonal
 Diagonal or Identity matrix. More...
 
struct  AltVector
 A dense vector or a constant vector. More...
 
struct  AltDense
 Dense or Identity matrix. More...
 
struct  AltMatrixStorage
 Storage type for AltMatrix. More...
 
class  AltMatrixBase
 Base class for any AltMatrix expression. More...
 
class  AltAsDiagonal
 
class  AltCwiseUnaryOp
 
struct  Adjoint
 Adjoint. More...
 
struct  storage
 Default storage type for AltMatrix nested types. More...
 
struct  storage< typename Eigen::CwiseNullaryOp< Eigen::internal::scalar_constant_op< Scalar >, Derived > >
 Storage for a constant matrix. More...
 
struct  storage< Eigen::DiagonalWrapper< Derived > >
 Storage for a diagonal wrapper. More...
 
struct  storage< Eigen::CwiseNullaryOp< Eigen::internal::scalar_identity_op< Scalar >, Eigen::Matrix< Scalar, Dynamic, Dynamic > > >
 Storage for the identity (with cwise) More...
 
class  AltMatrix
 Alt Matrix. More...
 
class  RowWise
 Row wise view of an Alt matrix. More...
 
class  AltBlock
 
struct  NoAlias
 
struct  MultOp
 Multiplication operator. More...
 
struct  MinusOp
 Difference operator. More...
 
struct  ExprType< Op, _Lhs, _Rhs, Eigen::OnTheLeft, isT1 >
 Defines an expression type when the Alt matrix is on the left. More...
 
struct  ExprType< Op, _Lhs, _Rhs, Eigen::OnTheRight, isT1 >
 Defines an expression type when the Alt matrix is on the right. More...
 
struct  AltExpression
 Defines the expression type of a multiplication. More...
 
class  AltArrayBase
 
class  AltArrayWrapper
 
class  AltMatrixWrapper
 Matrix expression out of an array expressio. More...
 
class  AltArrayOp
 
class  AltMatrixOp
 
struct  DiagonalBlockWrapper
 
struct  DiagonalBlockWrapperDenseMult< Lhs, Rhs, Eigen::OnTheRight >
 
struct  DiagonalBlockWrapperDenseMult< Lhs, Rhs, Eigen::OnTheLeft >
 
class  CleanerCollapse
 
struct  IndirectSort
 
struct  AbsIndirectSort
 
struct  ReducedSetNullSpaceResult
 
class  ReducedSetNullSpace
 
class  CleanerNullSpace
 
class  KQP_KKTSolver
 
class  KMult
 
class  QPConstraints
 
class  CleanerUnused
 
class  CleanerBase
 
class  Cleaner
 
class  CleanerList
 A series of cleaners. More...
 
class  CleanerRank
 Rank cleaner. More...
 
class  Decomposition
 
struct  IdentityStorage
 
class  EvdUpdateResult
 
class  FastRankOneUpdate
 
class  IndexedValue
 
class  LambdaComparator
 
struct  DiagonalComparator
 
class  EigenValues
 
class  Rotation
 
struct  ThinEVD
 
struct  Orthonormalize
 
struct  trace_info_struct_
 
class  exception
 
class  illegal_argument_exception
 
class  arithmetic_exception
 
class  out_of_bound_exception
 
class  illegal_operation_exception
 
class  not_implemented_exception
 
class  assertion_exception
 
class  bad_cast_exception
 
class  Dense
 A feature matrix where vectors are dense vectors in a fixed dimension. More...
 
class  DenseSpace
 
class  FeatureList
 A class that supposes that feature vectors know how to compute their inner product, i.e. inner(a,b) is defined. More...
 
struct  FeatureMatrixTypes< FVector >
 
struct  GenericVector< Scalar >
 A generic vector. More...
 
class  KernelSumMatrix
 
class  KernelSumSpace
 A feature matrix where vectors are sparse vectors in a high dimensional space. More...
 
class  Sparse
 A feature matrix where vectors are sparse vectors in a high dimensional space. More...
 
class  SparseSpace
 
class  SparseDense
 A feature matrix where vectors are in a dense subspace (in the canonical basis). More...
 
class  SparseDenseSpace
 
class  BoundedParameter
 
class  UnaryKernelSpace
 
class  GaussianSpace
 Gaussian Kernel \(k'(x,y) = \exp(\frac{2 Re(k(x,y)) - k(x) - k(y) \vert}{\sigma^2})\). More...
 
class  PolynomialSpace
 Polynomial Kernel \(k'(x,y) = (k(x,y) + D)^p\). More...
 
struct  ScalarDefinitions
 
struct  ScalarInfo< double >
 
struct  ScalarInfo< float >
 
struct  ScalarInfo< std::complex< double > >
 
struct  ScalarInfo< std::complex< float > >
 
class  KernelValues
 
class  FeatureMatrixBase
 Base for all feature matrix classes. More...
 
class  AbstractSpace
 
class  SpaceBase
 A feature space. More...
 
struct  IntervalsIterator
 An interval iterator. More...
 
class  Intervals
 
class  AccumulatorKernelEVD
 Accumulation based computation of the density. More...
 
class  AccumulatorKernelEVD< Scalar, true >
 
class  AccumulatorKernelEVD< Scalar, false >
 
class  DenseDirectBuilder
 Direct computation of the density (i.e. matrix representation) for dense vectors. More...
 
class  DivideAndConquerBuilder
 Meta builder: Uses other operator builders and combine them at regular intervals. More...
 
struct  BuilderFactoryBase
 
struct  BuilderFactory
 
class  DirectFactory
 
class  AccumulatorFactory
 
class  IncrementalFactory
 
class  DivideAndConquerFactory
 
class  IncrementalKernelEVD
 Uses other operator builders and combine them. More...
 
class  KernelEVDBase
 
class  KernelEVD
 Builds a compact representation of an hermitian operator. More...
 
class  Logger
 
class  KernelOperator
 
class  Event
 
class  Density
 
class  EigenList
 
struct  EigenListComparator
 
class  DecompositionList
 
class  Selector
 
class  ChainSelector
 
class  Aggregator
 
class  Max
 
class  Mean
 
class  RatioSelector
 Select the eigenvalues with a ratio to the highest magnitude above a given threshold. More...
 
class  RankSelector
 Select the highest eigenvalues (with a possible "reset" rank) More...
 
class  SpaceFactory
 Factory for. More...
 
struct  Mover
 
struct  columns
 Mover for columns. More...
 
struct  rows
 Mover for rows. More...
 

Typedefs

typedef boost::error_info
< struct errinfo_message_,
std::string > 
errinfo_message
 
typedef trace_info_struct_< void > trace_info_struct
 
typedef boost::error_info
< struct tag_stack,
trace_info_struct
stack_info
 
typedef Eigen::DenseIndex Index
 

Functions

template<typename MatrixType , unsigned int UpLo, typename Derived >
void rankUpdate (Eigen::SelfAdjointView< MatrixType, UpLo > &&matrix, const Eigen::MatrixBase< Derived > &mA, const typename MatrixType::Scalar alpha)
 
template<typename MatrixType , unsigned int UpLo, typename Derived >
void rankUpdate2 (Eigen::SelfAdjointView< MatrixType, UpLo > &&matrix, const AltMatrixBase< Derived > &mA, const typename MatrixType::Scalar alpha)
 
template<typename Derived >
const Eigen::MatrixBase
< Derived >::AdjointReturnType 
adjoint (const Eigen::MatrixBase< Derived > &x)
 
template<typename Derived >
Eigen::DiagonalWrapper< const
Derived > 
adjoint (const Eigen::DiagonalWrapper< const Derived > &x)
 
template<typename Scalar >
Eigen::Identity< Scalar > adjoint (const Eigen::Identity< Scalar > &x)
 
template<typename Derived >
auto blockSquaredNorm (const Eigen::MatrixBase< Derived > &x, Index row, Index col, Index rowSize, Index colSize) -> decltype(x.squaredNorm())
 
template<typename Derived >
auto blockSquaredNorm (const Eigen::DiagonalWrapper< Derived > &x, Index row, Index col, Index rowSize, Index colSize) -> decltype(x.diagonal().squaredNorm())
 
template<typename Scalar >
Scalar blockSquaredNorm (const Eigen::Identity< Scalar > &, Index row, Index col, Index rowSize, Index colSize)
 
template<typename Derived >
auto squaredNorm (const Eigen::MatrixBase< Derived > &x) -> decltype(x.derived().squaredNorm())
 
template<typename Derived >
auto squaredNorm (const Eigen::DiagonalWrapper< Derived > &x) -> decltype(x.diagonal().squaredNorm())
 
template<typename Derived >
void printExpression (std::ostream &out, const kqp::AltMatrixBase< Derived > &o)
 
template<typename Derived >
void printExpression (std::ostream &out, const Eigen::EigenBase< Derived > &x)
 
template<typename Scalar >
void printExpression (std::ostream &out, const Eigen::Identity< Scalar > &x)
 
template<typename Derived >
void printExpression (std::ostream &out, const Eigen::Transpose< Derived > &x)
 
template<typename Derived >
void printExpression (std::ostream &out, const Eigen::DiagonalWrapper< Derived > &x)
 
template<typename Scalar , int a, int b>
void printExpression (std::ostream &out, const Eigen::Matrix< Scalar, a, b > &x)
 
template<typename Derived , typename OtherDerived >
void printExpression (std::ostream &out, const Eigen::DiagonalProduct< Derived, OtherDerived, Eigen::OnTheLeft > &x)
 
template<typename Derived , typename OtherDerived >
void printExpression (std::ostream &out, const Eigen::DiagonalProduct< Derived, OtherDerived, Eigen::OnTheRight > &x)
 
template<typename Derived , typename OtherDerived >
void printExpression (std::ostream &out, const Eigen::GeneralProduct< Derived, OtherDerived > &x)
 
template<class Derived >
boost::enable_if_c
<(Eigen::internal::traits
< Derived >::RowsAtCompileTime==Dynamic)&&(Eigen::internal::traits
< Derived >::ColsAtCompileTime==Dynamic),
void >::type 
resize (Eigen::EigenBase< Derived > &matrix, bool conservative, Index rows, Index cols)
 Resize of fully dynamic matrices.
 
template<typename Scalar >
void resize (Eigen::Identity< Scalar > &matrix, bool conservative, Index rows, Index cols)
 Default resize.
 
template<typename T1 , typename T2 >
std::ostream & operator<< (std::ostream &out, const AltMatrix< T1, T2 > &alt_matrix)
 
template<typename Derived >
auto rowwise (const Derived &x) -> decltype(x.rowwise())
 
template<typename Derived >
auto rowwise (const Eigen::DiagonalWrapper< Derived > &x) -> decltype(x.diagonal().rowwise())
 
template<typename Scalar >
Eigen::Identity< Scalar >::RowWise rowwise (const Eigen::Identity< Scalar > &x)
 
template<typename Derived , typename OtherDerived >
void copy (const Eigen::MatrixBase< Derived > &from, const Eigen::MatrixBase< OtherDerived > &to)
 
template<typename Derived , typename OtherDerived >
void copy (const AltBlock< Derived > &from, const AltBlock< OtherDerived > &to)
 
template<typename Derived >
NoAlias< Derived > noalias (Eigen::MatrixBase< Derived > &m)
 
template<class Derived >
AltMatrixOp< MultOp, typename
Eigen::internal::traits
< Derived >::Scalar, Derived,
Eigen::OnTheRight > 
operator* (typename Eigen::internal::traits< Derived >::Scalar alpha, const kqp::AltMatrixBase< Derived > &a)
 
template<class Lhs , class Rhs >
DiagonalBlockWrapperDenseMult
< Lhs, Rhs, Eigen::OnTheRight > 
operator* (const kqp::DiagonalBlockWrapper< Lhs > &a, const Eigen::MatrixBase< Rhs > &b)
 
template<class Lhs , class Rhs >
DiagonalBlockWrapperDenseMult
< Lhs, Rhs, Eigen::OnTheLeft > 
operator* (const Eigen::MatrixBase< Lhs > &a, const kqp::DiagonalBlockWrapper< Rhs > &b)
 
 DEFINE_KQP_HLOGGER ("kqp.cleaning.null_space")
 
 DEFINE_KQP_HLOGGER ("kqp.qp-approach")
 
template<typename Derived >
bool isnan (const Eigen::MatrixBase< Derived > &x)
 
template<typename Scalar >
void solve_qp (int r, KQP_REAL_OF(Scalar) lambda, const KQP_MATRIX(Scalar)&gramMatrix, const KQP_MATRIX(Scalar)&alpha, const KQP_VECTOR(KQP_REAL_OF(Scalar))&nu, kqp::cvxopt::ConeQPReturn< KQP_REAL_OF(Scalar)> &result, const cvxopt::ConeQPOptions< KQP_REAL_OF(Scalar)> &options)
 
 DEFINE_KQP_HLOGGER ("kqp.cleaner")
 
bool is_real (double)
 
bool is_real (float)
 
template<typename Scalar >
bool is_real (const std::complex< Scalar > &f)
 
double real (double f)
 
float real (float f)
 
template<typename Scalar >
Scalar real (const std::complex< Scalar > &f)
 
template<class Compare , typename Scalar >
void sortValues (std::vector< IndexedValue< Scalar > * > &v, size_t from, Compare &compare)
 
double norm (double x)
 
float norm (float x)
 
template<typename Scalar >
Scalar norm (const std::complex< Scalar > &z)
 
template<typename Scalar >
Scalar computeZ (const std::vector< IndexedValue< Scalar > * > &v, int M, double lambda0, int i, const IndexedValue< Scalar > &vi, double di)
 
 RANK_ONE_UPDATE (double)
 
 RANK_ONE_UPDATE (float)
 
 RANK_ONE_UPDATE (std::complex< double >)
 
 RANK_ONE_UPDATE (std::complex< float >)
 
stack_info trace_info ()
 
template<typename T >
std::ostream & operator<< (std::ostream &x, const trace_info_struct_< T > &trace)
 
template<class E >
BOOST_ATTRIBUTE_NORETURN void throw_exception_ (E const &x, char const *current_function, char const *file, int line)
 
 DEFINE_KQP_HLOGGER ("kqp.feature-matrix.dense")
 
template<typename Scalar >
std::ostream & operator<< (std::ostream &out, const Dense< Scalar > &f)
 
template<Scalar >
Scalar inner (const GenericVector< Scalar > &a, const GenericVector< Scalar > &b)
 
template<Scalar >
Scalar inner (GenericVector< Scalar > &a)
 
template<typename Scalar >
std::ostream & operator<< (std::ostream &out, const Sparse< Scalar > &f)
 
 DEFINE_KQP_HLOGGER ("kqp.intervals")
 
 DEFINE_KQP_HLOGGER ("kqp.kevd.accumulator")
 
 DEFINE_KQP_HLOGGER ("kqp.kevd.dc")
 
 DEFINE_KQP_HLOGGER ("kqp.kernel-evd.incremental")
 
bool isNaN (double x)
 
bool isNaN (float x)
 
template<typename scalar >
bool isNaN (const std::complex< scalar > &x)
 
double epsilon ()
 
std::string demangle (const std::type_info &x)
 
template<class T >
std::string convert (const T &x)
 
template<class T >
convert (const std::string &s)
 
template<class T , class U >
boost::shared_ptr< T > our_dynamic_cast (boost::shared_ptr< U > const &r)
 
template<class T , class U >
our_dynamic_cast (U &r)
 
template<class T , class U >
our_dynamic_cast (U *r)
 
template<typename T , typename U >
lexical_cast (U &u)
 
log4cxx::LoggerPtr & main_logger ()
 
picojson::value readJsonFromFile (const std::string &jsonFile)
 
picojson::value readJsonFromString (const std::string &jsonString)
 
template<typename type >
type get (const std::string &context, picojson::object &o, const std::string &key, const type &_default)
 
template<typename type >
type get (const std::string &context, picojson::value &d, const std::string &key, const type &_default)
 
template<typename type >
type get (const std::string &context, picojson::object &o, const std::string &key)
 
template<typename type >
type get (const std::string &context, picojson::value &d, const std::string &key)
 
template<typename type >
type getNumeric (const std::string &context, picojson::value &d, const std::string &key, const type &_default)
 
template<typename type >
type getNumeric (const std::string &context, picojson::object &o, const std::string &key, const type &_default)
 
template<typename type >
type getNumeric (const std::string &context, picojson::value &d, const std::string &key)
 
template<typename type >
type getNumeric (const std::string &context, picojson::object &o, const std::string &key)
 
template<typename type >
type get (const std::string &context, const picojson::object &o, const std::string &key, const type &_default)
 
template<typename type >
type get (const std::string &context, const picojson::value &d, const std::string &key, const type &_default)
 
template<typename type >
type get (const std::string &context, const picojson::object &o, const std::string &key)
 
template<typename type >
type get (const std::string &context, const picojson::value &d, const std::string &key)
 
template<typename type >
type getNumeric (const std::string &context, const picojson::value &d, const std::string &key, const type &_default)
 
template<typename type >
type getNumeric (const std::string &context, const picojson::object &o, const std::string &key, const type &_default)
 
template<typename type >
type getNumeric (const std::string &context, const picojson::value &d, const std::string &key)
 
template<typename type >
type getNumeric (const std::string &context, const picojson::object &o, const std::string &key)
 
void selection (const std::vector< bool >::const_iterator &begin, const std::vector< bool >::const_iterator &end, Mover &mover)
 Reduces a set of indexed things by block.
 
template<typename Derived >
void select_columns (const std::vector< bool >::const_iterator &begin, const std::vector< bool >::const_iterator &end, const Derived &values, Derived &new_values)
 Select columns of a matrix.
 
template<typename Derived >
void select_columns (const std::vector< bool > &list, const Derived &values, Derived &new_values)
 
template<typename Derived >
void select_rows (const std::vector< bool >::const_iterator &begin, const std::vector< bool >::const_iterator &end, const Derived &values, Derived &new_values)
 Select rows of a matrix.
 
template<typename Derived >
void select_rows (const std::vector< bool > &list, const Derived &values, Derived &new_values)
 
template<typename Scalar >
void value_selection (const std::vector< bool >::const_iterator &begin, const std::vector< bool >::const_iterator &end, const Eigen::Matrix< Scalar, Dynamic, 1 > &values, const Eigen::Matrix< Scalar, Dynamic, 1 > &new_values)
 Reduces the eigenpair given the current selection pattern.
 

Variables

KQP_ALT_OP * MultOp
 
kqp::KernelSumMatrix inner
 

Detailed Description

Trace related functions.

Typedef Documentation

typedef boost::error_info<struct errinfo_message_,std::string> kqp::errinfo_message

Message information

Function Documentation

template<typename Scalar >
Scalar kqp::computeZ ( const std::vector< IndexedValue< Scalar > * > &  v,
int  M,
double  lambda0,
int  i,
const IndexedValue< Scalar > &  vi,
double  di 
)

Compute the value of z

Parameters
v
M
lambda0
i
vi
di
newz
Returns
template<class T >
std::string kqp::convert ( const T &  x)

Convert anything to a string. Might be specialized

template<class T >
T kqp::convert ( const std::string &  s)

Convert anything to a string. Might be specialized

double kqp::epsilon ( )
inline

Anything below is considered zero in approximations

bool kqp::isNaN ( double  x)
inline

Check if the value is a NaN

template<typename MatrixType , unsigned int UpLo, typename Derived >
void kqp::rankUpdate ( Eigen::SelfAdjointView< MatrixType, UpLo > &&  matrix,
const Eigen::MatrixBase< Derived > &  mA,
const typename MatrixType::Scalar  alpha 
)

Rank update with an Eigen matrix expression (used for recursion termination)

template<typename MatrixType , unsigned int UpLo, typename Derived >
void kqp::rankUpdate2 ( Eigen::SelfAdjointView< MatrixType, UpLo > &&  matrix,
const AltMatrixBase< Derived > &  mA,
const typename MatrixType::Scalar  alpha 
)

Rank update with an AltMatrix

Parameters
matrixThe matrix to be updated
mAThe matrix used for update
alphaThe update coefficient
template<class Derived >
boost::enable_if_c<(Eigen::internal::traits< Derived >::RowsAtCompileTime!=Dynamic)&&(Eigen::internal::traits< Derived >::ColsAtCompileTime==Dynamic), void >::type kqp::resize ( Eigen::EigenBase< Derived > &  matrix,
bool  conservative,
Index  rows,
Index  cols 
)

Resize of fully dynamic matrices.

Resize of row vectors.

Resize of vectors.

template<class Compare , typename Scalar >
void kqp::sortValues ( std::vector< IndexedValue< Scalar > * > &  v,
size_t  from,
Compare &  compare 
)
Parameters
v