Classes and types for basic data management


Classes

class  coco::basic_alltype
 The basic alltype which can hold any of a number of basic types. More...
class  coco::control_data
 The class for communicating parameter information to COCONUT modules. More...
class  coco::datamap
 The base class for communicating with COCONUT modules. More...
class  coco::info_contents
 The class for returning additional information from inference modules. More...
struct  coco::interval_st
 Constructor-free interval. More...
class  coco::interval
 Interval wrapper class. More...
class  coco::termination_reason
 This class holds the reason of termination of inference and management modules. More...
class  gptr< _Tp >
 Global pointer class. More...
class  ptr< _Tp >
 Local global pointer class. More...
class  counted_ptr< _Tp >
class  linalg::matrix< _Tp >
 Sparse Matrix Template Class (row major). More...
class  linalg::c_matrix< _Tp >
 Sparse Matrix Template Class (column major). More...
class  linalg::sparse_vector< _Tp >
 Sparse Vector Template Class. More...
class  linalg::__linalg_cvec< _TS >
 Adapter class for a const std::vector to a linear algebra vector. More...
class  linalg::__linalg_vec< _TS >
 Adapter class for a std::vector to a linear algebra vector. More...

Defines

#define BASIC_ALLTYPE_CHECK   1
#define BASIC_ALLTYPE_ASSERT(A)
#define BASIC_ALLTYPE_ASSERT2(A, B)
#define BASIC_ALLTYPE_FIX_EMPTY_VECTOR(CT, T)
#define linalg_trans(A)   mtl::trans((A))
#define linalg_scale(X, Y)   mtl::scaled(X, Y)

Typedefs

typedef basic_alltype coco::additional_info_u
 type definition for backwards compatibility with earlier API versions

Enumerations

enum  linalg::linalg_output_format { linalg::linalg_output_sparse, linalg::linalg_output_full }
 The possible output formats of a matrix. More...

Functions

void coco::set_translation_map (const std::map< std::string, std::string > &tr_msg_map)
 A datamap function for setting the message translation map.
const std::string & coco::get_translated_message (const std::string &msg)
 A datamap function for message translation.
template<class _Tp >
matrix< _Tp > linalg::operator+ (const matrix< _Tp > &A, const matrix< _Tp > &B)
 Sparse matrix addition operator.
template<class _Tp >
matrix< _Tp > linalg::operator* (_Tp a, const matrix< _Tp > &B)
 Sparse scalar matrix multiplication operator.
template<class _Tp >
c_matrix< _Tp > linalg::operator+ (const c_matrix< _Tp > &A, const c_matrix< _Tp > &B)
 Sparse matrix addition operator.
template<class _Tp >
c_matrix< _Tp > linalg::operator* (_Tp a, const c_matrix< _Tp > &B)
 Sparse matrix scalar multiplication operator.
template<class _Tp >
bool linalg::operator== (const sparse_vector< _Tp > &a, const sparse_vector< _Tp > &b)
 Sparse vector comparison operator.
template<class _Tp >
sparse_vector< _Tp > linalg::operator+ (const sparse_vector< _Tp > &a, const sparse_vector< _Tp > &b)
 Sparse vector addition operator.
template<class _Tp >
_Tp linalg::operator* (const sparse_vector< _Tp > &a, const sparse_vector< _Tp > &b)
 Sparse vector scalar product operator.
template<class _Tp >
sparse_vector< _Tp > linalg::operator* (_Tp a, const sparse_vector< _Tp > &b)
 Sparse vector scaling operator.
template<class _Ve >
std::vector< _Ve > & linalg::linalg_ssum (std::vector< _Ve > &a, _Ve b, const std::vector< _Ve > &c)
template<class _Ve >
std::vector< _Ve > & linalg::linalg_smult (std::vector< _Ve > &a, _Ve b)
template<class _TS >
_TS linalg::linalg_dot (const std::vector< _TS > &a, const std::vector< _TS > &b, _TS s)
template<class _Va , class _TS >
_TS linalg::linalg_dot (const _Va &a, const std::vector< _TS > &b, _TS s)
template<class _Vb , class _TS >
_TS linalg::linalg_dot (const std::vector< _TS > &a, const _Vb &b, _TS s)
template<class _Va , class _Vb , class _TS >
_TS linalg::linalg_dot (const _Va &a, const _Vb &b, _TS s)
template<class _TS >
void linalg::linalg_add (const std::vector< _TS > &a, const std::vector< _TS > &b, std::vector< _TS > &c)
template<class _Va , class _TS >
void linalg::linalg_add (const _Va &a, const std::vector< _TS > &b, std::vector< _TS > &c)
template<class _Vb , class _TS >
void linalg::linalg_add (const std::vector< _TS > &a, const _Vb &b, std::vector< _TS > &c)
template<class _TS , class _Vc >
void linalg::linalg_add (const std::vector< _TS > &a, const std::vector< _TS > &b, _Vc &c)
template<class _Va , class _Vb , class _TS >
void linalg::linalg_add (const _Va &a, const _Vb &b, std::vector< _TS > &c)
template<class _Va , class _TS , class _Vc >
void linalg::linalg_add (const _Va &a, const std::vector< _TS > &b, _Vc &c)
template<class _TS , class _Vb , class _Vc >
void linalg::linalg_add (const std::vector< _TS > &a, const _Vb &b, _Vc &c)
template<class _Va , class _Vb , class _Vc >
void linalg::linalg_add (const _Va &a, const _Vb &b, _Vc &c)
template<class _Matrix , class _TS >
void linalg::linalg_matvec (const _Matrix &A, const std::vector< _TS > &a, std::vector< _TS > &c)
template<class _Matrix , class _TS , class _Va >
void linalg::linalg_matvec (const _Matrix &A, const _Va &a, std::vector< _TS > &c)
template<class _Matrix , class _TS , class _Vc >
void linalg::linalg_matvec (const _Matrix &A, const std::vector< _TS > &a, _Vc &c)
template<class _Matrix , class _Va , class _Vc >
void linalg::linalg_matvec (const _Matrix &A, const _Va &a, _Vc &c)
template<class _Matrix , class _TS >
void linalg::linalg_matvecv (const _Matrix &A, const std::vector< _TS > &a, const std::vector< _TS > &b, std::vector< _TS > &c)
template<class _Matrix , class _TS , class _Va >
void linalg::linalg_matvecv (const _Matrix &A, const _Va &a, const std::vector< _TS > &b, std::vector< _TS > &c)
template<class _Matrix , class _TS , class _Vb >
void linalg::linalg_matvecv (const _Matrix &A, const std::vector< _TS > &a, const _Vb &b, std::vector< _TS > &c)
template<class _Matrix , class _TS , class _Vc >
void linalg::linalg_matvecv (const _Matrix &A, const std::vector< _TS > &a, const std::vector< _TS > &b, _Vc &c)
template<class _Matrix , class _Va , class _Vb , class _TS >
void linalg::linalg_matvecv (const _Matrix &A, _Va &a, const _Vb &b, const std::vector< _TS > &c)
template<class _Matrix , class _Va , class _TS , class _Vc >
void linalg::linalg_matvecv (const _Matrix &A, const _Va &a, const std::vector< _TS > &b, _Vc &c)
template<class _Matrix , class _TS , class _Vb , class _Vc >
void linalg::linalg_matvecv (const _Matrix &A, const std::vector< _TS > &a, const _Vb &b, _Vc &c)
template<class _Matrix , class _Va , class _Vb , class _Vc >
void linalg::linalg_matvecv (const _Matrix &A, const _Va &a, const _Vb &b, _Vc &c)

Detailed Description

The classes and types in this section are the basics for the internal data management of the COCONUT environment.

Define Documentation

#define BASIC_ALLTYPE_ASSERT (  ) 

Value:

do { \
      if(__cont_type != (A)) \
        throw api_exception(apiee_internal,\
          std::string("api/basic_alltype.h/1: Basic alltype ")+type_cstr((A))+\
                      " requested, type was "+type_name());\
    } while(0)
Compare the requested type with the stored type and throw an exception if they do not coincide.

Definition at line 87 of file basic_alltype.h.

#define BASIC_ALLTYPE_ASSERT2 ( A,
 ) 

Value:

do { \
      if(__cont_type != (A) && __cont_type != (B)) \
        throw api_exception(apiee_internal,\
          std::string("api/basic_alltype.h/2: Basic alltype ")+type_cstr((A))+\
                      " requested, type was "+type_name());\
    } while(0)
Compare the requested type with the stored type and a fallback type and throw an exception if it does not coincide with either.

Definition at line 98 of file basic_alltype.h.

#define BASIC_ALLTYPE_CHECK   1

If BASIC_ALLTYPE_CHECK is non-null, the exact contents of the basic_alltype are checked, and an exception is thrown if a different type is requested than is contained.

Definition at line 47 of file basic_alltype.h.

#define BASIC_ALLTYPE_FIX_EMPTY_VECTOR ( CT,
 ) 

Value:

do { \
      if (__cont_type != (CT) && is_empty_vector()) \
        /* The const_cast is ugly, but there's no other option. */ \
        const_cast<basic_alltype *>(this)->operator=(std::vector<T>()); \
    } while(0)
Convert any size 0 vector to any other. This is needed because [] in Python is untyped.

Definition at line 117 of file basic_alltype.h.

#define linalg_scale ( X,
 )     mtl::scaled(X, Y)

This function computes the vector/matrix Y scaled by X.

Definition at line 1142 of file linalg.h.

#define linalg_trans (  )     mtl::trans((A))

This function computes the transposed of the matrix A.

Definition at line 1139 of file linalg.h.


Typedef Documentation

typedef basic_alltype coco::additional_info_u

This is a definition to keep backwards compatibility with earlier versions of the API (before 2.35).

Definition at line 43 of file addinfo.h.


Enumeration Type Documentation

This class describes the possible output formats using the <<-operator for a sparse matrix.

Enumerator:
linalg_output_sparse  This is a possible value of the output_format member of the matrix class, which instructs the << operator to print the matrix in a Matlab-like sparse matrix format.
linalg_output_full  This is a possible value of the output_format member of the matrix class, which instructs the << operator to print the matrix in a full rectangular matrix format including all zeros.

Definition at line 223 of file linalg.h.


Function Documentation

const std::string & coco::get_translated_message ( const std::string &  msg  ) 

This map can be used during the registration phase for producing highly descriptive termr messages or translations.

Definition at line 64 of file termreason.cc.

template<class _Va , class _Vb , class _Vc >
void linalg::linalg_add ( const _Va &  a,
const _Vb &  b,
_Vc &  c 
) [inline]

This function computes the vector addition c=a+b.

Definition at line 1038 of file linalg.h.

template<class _TS , class _Vb , class _Vc >
void linalg::linalg_add ( const std::vector< _TS > &  a,
const _Vb &  b,
_Vc &  c 
) [inline]

This function computes the vector addition c=a+b.

Definition at line 1032 of file linalg.h.

template<class _Va , class _TS , class _Vc >
void linalg::linalg_add ( const _Va &  a,
const std::vector< _TS > &  b,
_Vc &  c 
) [inline]

This function computes the vector addition c=a+b.

Definition at line 1026 of file linalg.h.

template<class _Va , class _Vb , class _TS >
void linalg::linalg_add ( const _Va &  a,
const _Vb &  b,
std::vector< _TS > &  c 
) [inline]

This function computes the vector addition c=a+b.

Definition at line 1020 of file linalg.h.

template<class _TS , class _Vc >
void linalg::linalg_add ( const std::vector< _TS > &  a,
const std::vector< _TS > &  b,
_Vc &  c 
) [inline]

This function computes the vector addition c=a+b.

Definition at line 1014 of file linalg.h.

template<class _Vb , class _TS >
void linalg::linalg_add ( const std::vector< _TS > &  a,
const _Vb &  b,
std::vector< _TS > &  c 
) [inline]

This function computes the vector addition c=a+b.

Definition at line 1008 of file linalg.h.

template<class _Va , class _TS >
void linalg::linalg_add ( const _Va &  a,
const std::vector< _TS > &  b,
std::vector< _TS > &  c 
) [inline]

This function computes the vector addition c=a+b.

Definition at line 1002 of file linalg.h.

template<class _TS >
void linalg::linalg_add ( const std::vector< _TS > &  a,
const std::vector< _TS > &  b,
std::vector< _TS > &  c 
) [inline]

This function computes the vector addition c=a+b.

Definition at line 996 of file linalg.h.

template<class _Va , class _Vb , class _TS >
_TS linalg::linalg_dot ( const _Va &  a,
const _Vb &  b,
_TS  s 
) [inline]

This function computes the inner product s*a*b.

Definition at line 986 of file linalg.h.

template<class _Vb , class _TS >
_TS linalg::linalg_dot ( const std::vector< _TS > &  a,
const _Vb &  b,
_TS  s 
) [inline]

This function computes the inner product s*a*b.

Definition at line 980 of file linalg.h.

template<class _Va , class _TS >
_TS linalg::linalg_dot ( const _Va &  a,
const std::vector< _TS > &  b,
_TS  s 
) [inline]

This function computes the inner product s*a*b.

Definition at line 973 of file linalg.h.

template<class _TS >
_TS linalg::linalg_dot ( const std::vector< _TS > &  a,
const std::vector< _TS > &  b,
_TS  s 
) [inline]

This function computes the inner product s*a*b.

Definition at line 967 of file linalg.h.

template<class _Matrix , class _Va , class _Vc >
void linalg::linalg_matvec ( const _Matrix &  A,
const _Va &  a,
_Vc &  c 
) [inline]

This function computes the matrix-vector product c=Aa.

Definition at line 1070 of file linalg.h.

template<class _Matrix , class _TS , class _Vc >
void linalg::linalg_matvec ( const _Matrix &  A,
const std::vector< _TS > &  a,
_Vc &  c 
) [inline]

This function computes the matrix-vector product c=Aa.

Definition at line 1063 of file linalg.h.

template<class _Matrix , class _TS , class _Va >
void linalg::linalg_matvec ( const _Matrix &  A,
const _Va &  a,
std::vector< _TS > &  c 
) [inline]

This function computes the matrix-vector product c=Aa.

Definition at line 1056 of file linalg.h.

template<class _Matrix , class _TS >
void linalg::linalg_matvec ( const _Matrix &  A,
const std::vector< _TS > &  a,
std::vector< _TS > &  c 
) [inline]

This function computes the matrix-vector product c=Aa.

Definition at line 1049 of file linalg.h.

template<class _Matrix , class _Va , class _Vb , class _Vc >
void linalg::linalg_matvecv ( const _Matrix &  A,
const _Va &  a,
const _Vb &  b,
_Vc &  c 
) [inline]

This function computes the generalized matrix-vector product c=Aa+b.

Definition at line 1130 of file linalg.h.

template<class _Matrix , class _TS , class _Vb , class _Vc >
void linalg::linalg_matvecv ( const _Matrix &  A,
const std::vector< _TS > &  a,
const _Vb &  b,
_Vc &  c 
) [inline]

This function computes the generalized matrix-vector product c=Aa+b.

Definition at line 1123 of file linalg.h.

template<class _Matrix , class _Va , class _TS , class _Vc >
void linalg::linalg_matvecv ( const _Matrix &  A,
const _Va &  a,
const std::vector< _TS > &  b,
_Vc &  c 
) [inline]

This function computes the generalized matrix-vector product c=Aa+b.

Definition at line 1116 of file linalg.h.

template<class _Matrix , class _Va , class _Vb , class _TS >
void linalg::linalg_matvecv ( const _Matrix &  A,
_Va &  a,
const _Vb &  b,
const std::vector< _TS > &  c 
) [inline]

This function computes the generalized matrix-vector product c=Aa+b.

Definition at line 1109 of file linalg.h.

template<class _Matrix , class _TS , class _Vc >
void linalg::linalg_matvecv ( const _Matrix &  A,
const std::vector< _TS > &  a,
const std::vector< _TS > &  b,
_Vc &  c 
) [inline]

This function computes the generalized matrix-vector product c=Aa+b.

Definition at line 1102 of file linalg.h.

template<class _Matrix , class _TS , class _Vb >
void linalg::linalg_matvecv ( const _Matrix &  A,
const std::vector< _TS > &  a,
const _Vb &  b,
std::vector< _TS > &  c 
) [inline]

This function computes the generalized matrix-vector product c=Aa+b.

Definition at line 1095 of file linalg.h.

template<class _Matrix , class _TS , class _Va >
void linalg::linalg_matvecv ( const _Matrix &  A,
const _Va &  a,
const std::vector< _TS > &  b,
std::vector< _TS > &  c 
) [inline]

This function computes the generalized matrix-vector product c=Aa+b.

Definition at line 1088 of file linalg.h.

template<class _Matrix , class _TS >
void linalg::linalg_matvecv ( const _Matrix &  A,
const std::vector< _TS > &  a,
const std::vector< _TS > &  b,
std::vector< _TS > &  c 
) [inline]

This function computes the generalized matrix-vector product c=Aa+b.

Definition at line 1080 of file linalg.h.

template<class _Ve >
std::vector<_Ve>& linalg::linalg_smult ( std::vector< _Ve > &  a,
_Ve  b 
) [inline]

This function computes a=b*a and returns a.

Definition at line 1165 of file linalg.h.

template<class _Ve >
std::vector<_Ve>& linalg::linalg_ssum ( std::vector< _Ve > &  a,
_Ve  b,
const std::vector< _Ve > &  c 
) [inline]

This function computes the generalized sum a=a+b*c and returns a.

Definition at line 1148 of file linalg.h.

template<class _Tp >
sparse_vector<_Tp> linalg::operator* ( _Tp  a,
const sparse_vector< _Tp > &  b 
) [inline]

This function computes product of a sparse vector and a scalar.

Definition at line 831 of file linalg.h.

template<class _Tp >
_Tp linalg::operator* ( const sparse_vector< _Tp > &  a,
const sparse_vector< _Tp > &  b 
) [inline]

This function computes the scalar product of two sparse vectors.

Definition at line 808 of file linalg.h.

template<class _Tp >
c_matrix<_Tp> linalg::operator* ( _Tp  a,
const c_matrix< _Tp > &  B 
) [inline]

This function multiplies a sparse matrix with a scalar, returning the result.

Definition at line 549 of file linalg.h.

template<class _Tp >
matrix<_Tp> linalg::operator* ( _Tp  a,
const matrix< _Tp > &  B 
) [inline]

This function multiplies a sparse matrix with a scalar, returning the result.

Definition at line 375 of file linalg.h.

template<class _Tp >
sparse_vector<_Tp> linalg::operator+ ( const sparse_vector< _Tp > &  a,
const sparse_vector< _Tp > &  b 
) [inline]

This function adds two sparse vectors, returning the result.

Definition at line 781 of file linalg.h.

template<class _Tp >
c_matrix<_Tp> linalg::operator+ ( const c_matrix< _Tp > &  A,
const c_matrix< _Tp > &  B 
) [inline]

This function adds two sparse matrices, returning the result.

Definition at line 526 of file linalg.h.

template<class _Tp >
matrix<_Tp> linalg::operator+ ( const matrix< _Tp > &  A,
const matrix< _Tp > &  B 
) [inline]

This function adds two sparse matrices, returning the result.

Definition at line 352 of file linalg.h.

template<class _Tp >
bool linalg::operator== ( const sparse_vector< _Tp > &  a,
const sparse_vector< _Tp > &  b 
) [inline]

This function returns whether two sparse vectors are equal.

Definition at line 717 of file linalg.h.

void coco::set_translation_map ( const std::map< std::string, std::string > &  tr_msg_map  ) 

This function is used to set a new message translation map.

Definition at line 53 of file termreason.cc.


Generated on Tue Feb 9 14:47:16 2010 for COCONUT API by  doxygen 1.5.8