CVM Class Library  8.1
This C++ class library encapsulates concepts of vector and different matrices including square, band, symmetric and hermitian ones in Euclidean space of real and complex numbers.
 All Classes Files Functions Variables Typedefs Friends Macros Pages
Classes | Macros | Typedefs | Functions
cvm.h File Reference
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
#include <math.h>
#include <float.h>
#include <time.h>
#include <iostream>
#include <list>
#include <map>
#include <string>
#include <limits>
#include <complex>
#include <algorithm>
#include <exception>
#include <utility>
#include <new>
#include <random>
Include dependency graph for cvm.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  ArrayDeleter< T >
 Array deleter helper class More...
class  ErrMessages
 Internal error messages holder. More...
class  cvmexception
 Library exception class. More...
class  type_proxy< T, TR >
 Read-write access for a particular value. More...
class  Randomizer< T >
 Random numbers generator. More...
class  basic_array< TR, TC >
 Abstract array of numbers with increment between them. Root object for all library classes. More...
class  basic_rvector< TR >
 End-user class encapsulating vector of real numbers. More...
class  basic_cvector< TR, TC >
 End-user class encapsulating vector of complex numbers. More...
class  Matrix< TR, TC >
 Generalized matrix class (not end-user) More...
class  SqMatrix< TR, TC >
 Generalized square matrix class (not end-user) More...
class  basic_rmatrix< TR >
 End-user class encapsulating matrix of real numbers. More...
class  basic_srmatrix< TR >
 End-user class encapsulating square matrix of real numbers. More...
class  basic_cmatrix< TR, TC >
 End-user class encapsulating matrix of complex numbers. More...
class  basic_scmatrix< TR, TC >
 End-user class encapsulating square matrix of complex numbers. More...
class  BandMatrix< TR, TC >
 Generalized band matrix class (not end-user) More...
class  basic_srbmatrix< TR >
 End-user class encapsulating band square matrix of real numbers. More...
class  basic_scbmatrix< TR, TC >
 End-user class encapsulating band square matrix of complex numbers. More...
class  basic_srsmatrix< TR >
 End-user class encapsulating symmetric matrix of real numbers. More...
class  basic_schmatrix< TR, TC >
 End-user class encapsulating hermitian matrix of complex numbers. More...

Macros

#define TINT_ZERO   (0)
#define TINT_ONE   (1)
#define CVM_TINT_FORMAT   "%d"
#define CVM0   TINT_ONE
 Index base, 1 by default or 0 when CVM_ZERO_BASED is defined.
#define CVM_MT
#define _PTHREADS
#define CVM_ASSERT(p, n)
#define CVM_OK   0
 Error code for No error.
#define CVM_OUTOFMEMORY   1
 Error code for "Failed to allocate %u bytes of memory".
#define CVM_WRONGSIZE   5
 Error code for "Wrong size %d".
#define CVM_SIZESMISMATCH   6
 Error code for "Sizes mismatch: %d!=%d".
#define CVM_WRONGMKLARG   7
 Error code for "Wrong argument %d passed to BLAS or LAPACK subroutine" - this one never gets called, XERBLA does the job.
#define CVM_WRONGMKLARG2   8
 Error code for "Wrong argument %d passed to BLAS or LAPACK subroutine %s".
#define CVM_SINGULARMATRIX   9
 Error code for "The diagonal element (or main minor) %d of the matrix is zero (or singular)".
#define CVM_NOTPOSITIVEDEFINITE   10
 Error code for "The leading minor of order %d (and hence the matrix itself) is not positive-definite".
#define CVM_WRONGCHOLESKYFACTOR   11
 Error code for "The diagonal element %d of the Cholesky factor (and hence the factor itself) is zero".
#define CVM_WRONGBUNCHKAUFMANFACTOR   12
 Error code for "The diagonal element %d of the Bunch-Kaufman factor (and hence the factor itself) is zero".
#define CVM_NOTPOSITIVEDIAG   13
 Error code for "The diagonal element %d of the matrix is nonpositive. Equilibration failed".
#define CVM_CONVERGENCE_ERROR   14
 Error code for "Method failed to converge: %s at %s:%d".
#define CVM_DIVISIONBYZERO   15
 Error code for "Attempt to divide by zero".
#define CVM_SEMAPHOREERROR   16
 Error code for "Critical Section access error" (Windows) or "Semaphore access error" (Unix)
#define CVM_READ_ONLY_ACCESS   17
 Error code for "Attempt to change a read-only element".
#define CVM_SUBMATRIXACCESSERROR   18
 Error code for "Attempt to access non-continuous submatrix as a continuous array, see programmer's reference for details".
#define CVM_SUBMATRIXNOTAVAILABLE   19
 Error code for "Submatrix instantiation is not available for class '%s', see programmer's reference for details".
#define CVM_MATRIXNOTSYMMETRIC   20
 Error code for "The matrix passed doesn't appear to be symmetric".
#define CVM_MATRIXNOTHERMITIAN   21
 Error code for "The matrix passed doesn't appear to be hermitian (%g vs. tolerance %g)".
#define CVM_BREAKS_HERMITIANITY   22
 Error code for "This operation could make the matrix non-hermitian. Use %s instead".
#define CVM_METHODNOTAVAILABLE   23
 Error code for "Function '%s' is not available for class '%s'. See programmer's reference for details".
#define CVM_NOTIMPLEMENTED   24
 Error code for "Function '%s' is not implemented".
#define CVM_CANT_RESIZE_SHARED_MEM   25
 Error code for "Can't resize shared memory".
#define CVM_NOT_CONJUGATED   26
 Error code for "Complex numbers are not conjugated: (%g,%g) vs. (%g,%g) with tolerance %g".
#define CVM_WRONGSIZE_LT   27
 Error code for "Wrong size: %d < %d".
#define CVM_WRONGSIZE_LE   28
 Error code for "Wrong size: %d <= %d".
#define CVM_INDEX_GT   29
 Error code for "Index value %d > %d".
#define CVM_INDEX_GE   30
 Error code for "Index value %d >= %d".
#define CVM_OUTOFRANGE_LTGT   31
 Error code for "Index value %d is out of [%d,%d] range".
#define CVM_OUTOFRANGE_LTGE   32
 Error code for "Index value %d is out of [%d,%d) range".
#define CVM_OUTOFRANGE_LTGE1   33
 Error code for "Index value %d is out of [%d,%d) range".
#define CVM_OUTOFRANGE_LTGE2   34
 Error code for "Index value %d is out of [%d,%d) range".
#define CVM_SIZESMISMATCH_GT   35
 Error code for "Sizes mismatch: %d > %d".
#define CVM_SIZESMISMATCH_LT   36
 Error code for "Sizes mismatch: %d > %d".
#define CVM_THE_LAST_ERROR_CODE   37
 Error code to be used it in derived classes while defining user error codes.
#define CVM_MATRIX_ELEMENT_SEPARATOR   " "
#define CVM_EOL   std::endl
#define CVM_NAMESPACE_BEG   namespace cvm {
#define CVM_NAMESPACE_END   }
#define XERBLA   xerbla_
 BLAS callback error handler, don't use.

Typedefs

typedef int tint
 Either 32 of 64 bit (when CVM_ILP64 is defined) signed integer.
typedef unsigned char tbyte
 memory allocation quantum
typedef double treal
 Either double (default) of float (when CVM_FLOAT is defined)
typedef std::complex< trealtcomplex
 Complex nymber type defined as std::complex<treal> (see also treal)
typedef basic_array< tint, tintiarray
 End-user class: array of integers, see basic_array.
typedef basic_rvector< trealrvector
 End-user class: vector of real numbers, see basic_rvector.
typedef basic_rmatrix< trealrmatrix
 End-user class: matrix of real numbers, see basic_rmatrix.
typedef basic_srmatrix< trealsrmatrix
 End-user class: square matrix of real numbers, see basic_srmatrix.
typedef basic_cvector< treal,
tcomplex
cvector
 End-user class: vector of complex numbers, see basic_cvector.
typedef basic_cmatrix< treal,
tcomplex
cmatrix
 End-user class: matrix of complex numbers, see basic_cmatrix.
typedef basic_scmatrix< treal,
tcomplex
scmatrix
 End-user class: square matrix of complex numbers, see basic_scmatrix.
typedef basic_srbmatrix< trealsrbmatrix
 End-user class: square band matrix of real numbers, see basic_srbmatrix.
typedef basic_scbmatrix< treal,
tcomplex
scbmatrix
 End-user class: square band matrix of complex numbers, see basic_scbmatrix.
typedef basic_srsmatrix< trealsrsmatrix
 End-user class: square symmetric matrix of real numbers, see basic_srsmatrix.
typedef basic_schmatrix< treal,
tcomplex
schmatrix
 End-user class: square hermitian matrix of complex numbers, see basic_schmatrix.

Functions

template<typename T >
T * cvmMalloc (tint nEls) throw (cvmexception)
 define this to use Memory Pool Manager (not used by default sinse version 6.0)
template<typename T >
tint cvmFree (T *&pd)
 Memory deallocator.
CVM_API void cvmExit ()
 Memory pool destroyer.
template<typename T >
void cvmZeroMemory (T *p, tint nEls)
 Memory cleaner.
template<typename T , typename TR >
std::ostream & operator<< (std::ostream &os, const type_proxy< T, TR > &mOut)
 Sends proxy value to output stream.
template<typename T , typename TR >
std::istream & operator>> (std::istream &is, type_proxy< T, TR > &v)
 Reads proxy value from input stream.
template<typename TR , typename TC >
std::istream & operator>> (std::istream &is, basic_array< TR, TC > &aIn)
 Reads basic_array from input stream.
template<typename TR , typename TC >
std::ostream & operator<< (std::ostream &os, const basic_array< TR, TC > &aOut)
 Writes basic_array to output stream.
template<typename TR , typename TC >
std::istream & operator>> (std::istream &is, Matrix< TR, TC > &mIn)
 Reads Matrix from input stream.
template<typename TR , typename TC >
std::ostream & operator<< (std::ostream &os, const Matrix< TR, TC > &mOut)
 Writes Matrix to output stream.
template<typename T , typename TR >
std::complex< TR > operator+ (const std::complex< TR > &u, const type_proxy< T, TR > &p)
 Prefix version for proxy.
template<typename T , typename TR >
std::complex< TR > operator- (const std::complex< TR > &u, const type_proxy< T, TR > &p)
 Prefix version for proxy.
template<typename T , typename TR >
std::complex< TR > operator* (const std::complex< TR > &u, const type_proxy< T, TR > &p)
 Prefix version for proxy.
template<typename T , typename TR >
std::complex< TR > operator/ (const std::complex< TR > &u, const type_proxy< T, TR > &p)
 Prefix version for proxy.
template<typename U , typename T , typename TR >
operator+ (U u, const type_proxy< T, TR > &p)
 Prefix version for proxy.
template<typename U , typename T , typename TR >
operator- (U u, const type_proxy< T, TR > &p)
 Prefix version for proxy.
template<typename U , typename T , typename TR >
operator* (U u, const type_proxy< T, TR > &p)
 Prefix version for proxy.
template<typename U , typename T , typename TR >
operator/ (U u, const type_proxy< T, TR > &p)
 Prefix version for proxy.
template<typename TR >
basic_rvector< TR > operator* (TR d, const basic_rvector< TR > &v)
 Left-sided scalar multiplication.
template<typename TR >
basic_rmatrix< TR > operator* (TR d, const basic_rmatrix< TR > &m)
 Left-sided scalar multiplication.
template<typename TR >
basic_srmatrix< TR > operator* (TR d, const basic_srmatrix< TR > &m)
 Left-sided scalar multiplication.
template<typename TR >
basic_srbmatrix< TR > operator* (TR d, const basic_srbmatrix< TR > &m)
 Left-sided scalar multiplication.
template<typename TR >
basic_srsmatrix< TR > operator* (TR d, const basic_srsmatrix< TR > &m)
 Left-sided scalar multiplication.
template<typename TR , typename TC >
basic_cvector< TR, TC > operator* (TR d, const basic_cvector< TR, TC > &v)
 Left-sided scalar multiplication.
template<typename TR , typename TC >
basic_cmatrix< TR, TC > operator* (TR d, const basic_cmatrix< TR, TC > &m)
 Left-sided scalar multiplication.
template<typename TR , typename TC >
basic_scmatrix< TR, TC > operator* (TR d, const basic_scmatrix< TR, TC > &m)
 Left-sided scalar multiplication.
template<typename TR , typename TC >
basic_scbmatrix< TR, TC > operator* (TR d, const basic_scbmatrix< TR, TC > &m)
 Left-sided scalar multiplication.
template<typename TR , typename TC >
basic_schmatrix< TR, TC > operator* (TR d, const basic_schmatrix< TR, TC > &m)
 Left-sided scalar multiplication.
template<typename TR , typename TC >
basic_cvector< TR, TC > operator* (std::complex< TR > c, const basic_cvector< TR, TC > &v)
 Left-sided scalar multiplication.
template<typename TR , typename TC >
basic_cmatrix< TR, TC > operator* (std::complex< TR > c, const basic_cmatrix< TR, TC > &m)
 Left-sided scalar multiplication.
template<typename TR , typename TC >
basic_scmatrix< TR, TC > operator* (std::complex< TR > c, const basic_scmatrix< TR, TC > &m)
 Left-sided scalar multiplication.
template<typename TR , typename TC >
basic_scbmatrix< TR, TC > operator* (std::complex< TR > c, const basic_scbmatrix< TR, TC > &m)
 Left-sided scalar multiplication.
template<typename TR , typename TC >
basic_scmatrix< TR, TC > operator* (std::complex< TR > c, const basic_schmatrix< TR, TC > &m)
 Left-sided scalar multiplication (hermiticity gets lost here)
template<typename TR >
basic_rvector< TR > operator* (CVM_LONGEST_INT d, const basic_rvector< TR > &v)
 Left-sided scalar multiplication.
template<typename TR >
basic_rmatrix< TR > operator* (CVM_LONGEST_INT d, const basic_rmatrix< TR > &m)
 Left-sided scalar multiplication.
template<typename TR >
basic_srmatrix< TR > operator* (CVM_LONGEST_INT d, const basic_srmatrix< TR > &m)
 Left-sided scalar multiplication.
template<typename TR >
basic_srbmatrix< TR > operator* (CVM_LONGEST_INT d, const basic_srbmatrix< TR > &m)
 Left-sided scalar multiplication.
template<typename TR >
basic_srsmatrix< TR > operator* (CVM_LONGEST_INT d, const basic_srsmatrix< TR > &m)
 Left-sided scalar multiplication.
template<typename TR , typename TC >
basic_cvector< TR, TC > operator* (CVM_LONGEST_INT d, const basic_cvector< TR, TC > &v)
 Left-sided scalar multiplication.
template<typename TR , typename TC >
basic_cmatrix< TR, TC > operator* (CVM_LONGEST_INT d, const basic_cmatrix< TR, TC > &m)
 Left-sided scalar multiplication.
template<typename TR , typename TC >
basic_scmatrix< TR, TC > operator* (CVM_LONGEST_INT d, const basic_scmatrix< TR, TC > &m)
 Left-sided scalar multiplication.
template<typename TR , typename TC >
basic_scbmatrix< TR, TC > operator* (CVM_LONGEST_INT d, const basic_scbmatrix< TR, TC > &m)
 Left-sided scalar multiplication.
template<typename TR , typename TC >
basic_schmatrix< TR, TC > operator* (CVM_LONGEST_INT d, const basic_schmatrix< TR, TC > &m)
 Left-sided scalar multiplication.
template<typename TR >
const basic_srmatrix< TR > basic_eye_real (tint nM)
 Real identity matrix creation.
template<typename TR , typename TC >
const basic_scmatrix< TR, TC > basic_eye_complex (tint nM)
 Complex identity matrix creation.
const srmatrix eye_real (tint nM)
 Real identity matrix creation.
const scmatrix eye_complex (tint nM)
 Complex identity matrix creation.
treal cvmMachMin ()
 The smallest normalized positive number.
treal cvmMachSp ()
 The largest relative spacing.
void __stdcall XERBLA (const char *szSubName, const tint *pnParam) throw (cvm::cvmexception)

Detailed Description

Definition in file cvm.h.

Macro Definition Documentation

#define TINT_ZERO   (0)

Definition at line 43 of file cvm.h.

#define TINT_ONE   (1)

Definition at line 44 of file cvm.h.

#define CVM_TINT_FORMAT   "%d"

Definition at line 45 of file cvm.h.

#define CVM0   TINT_ONE

Index base, 1 by default or 0 when CVM_ZERO_BASED is defined.

Definition at line 52 of file cvm.h.

#define CVM_MT

Definition at line 56 of file cvm.h.

#define _PTHREADS

Definition at line 58 of file cvm.h.

#define CVM_ASSERT (   p,
 
)

Definition at line 247 of file cvm.h.

#define CVM_OK   0

Error code for No error.

Definition at line 250 of file cvm.h.

#define CVM_OUTOFMEMORY   1

Error code for "Failed to allocate %u bytes of memory".

Definition at line 251 of file cvm.h.

#define CVM_WRONGSIZE   5

Error code for "Wrong size %d".

Definition at line 252 of file cvm.h.

#define CVM_SIZESMISMATCH   6

Error code for "Sizes mismatch: %d!=%d".

Definition at line 253 of file cvm.h.

#define CVM_WRONGMKLARG   7

Error code for "Wrong argument %d passed to BLAS or LAPACK subroutine" - this one never gets called, XERBLA does the job.

Definition at line 254 of file cvm.h.

#define CVM_WRONGMKLARG2   8

Error code for "Wrong argument %d passed to BLAS or LAPACK subroutine %s".

Definition at line 255 of file cvm.h.

#define CVM_SINGULARMATRIX   9

Error code for "The diagonal element (or main minor) %d of the matrix is zero (or singular)".

Definition at line 256 of file cvm.h.

#define CVM_NOTPOSITIVEDEFINITE   10

Error code for "The leading minor of order %d (and hence the matrix itself) is not positive-definite".

Definition at line 257 of file cvm.h.

#define CVM_WRONGCHOLESKYFACTOR   11

Error code for "The diagonal element %d of the Cholesky factor (and hence the factor itself) is zero".

Definition at line 258 of file cvm.h.

#define CVM_WRONGBUNCHKAUFMANFACTOR   12

Error code for "The diagonal element %d of the Bunch-Kaufman factor (and hence the factor itself) is zero".

Definition at line 259 of file cvm.h.

#define CVM_NOTPOSITIVEDIAG   13

Error code for "The diagonal element %d of the matrix is nonpositive. Equilibration failed".

Definition at line 260 of file cvm.h.

#define CVM_CONVERGENCE_ERROR   14

Error code for "Method failed to converge: %s at %s:%d".

Definition at line 261 of file cvm.h.

#define CVM_DIVISIONBYZERO   15

Error code for "Attempt to divide by zero".

Definition at line 262 of file cvm.h.

#define CVM_SEMAPHOREERROR   16

Error code for "Critical Section access error" (Windows) or "Semaphore access error" (Unix)

Definition at line 263 of file cvm.h.

#define CVM_READ_ONLY_ACCESS   17

Error code for "Attempt to change a read-only element".

Definition at line 264 of file cvm.h.

#define CVM_SUBMATRIXACCESSERROR   18

Error code for "Attempt to access non-continuous submatrix as a continuous array, see programmer's reference for details".

Definition at line 265 of file cvm.h.

#define CVM_SUBMATRIXNOTAVAILABLE   19

Error code for "Submatrix instantiation is not available for class '%s', see programmer's reference for details".

Definition at line 266 of file cvm.h.

#define CVM_MATRIXNOTSYMMETRIC   20

Error code for "The matrix passed doesn't appear to be symmetric".

Definition at line 267 of file cvm.h.

#define CVM_MATRIXNOTHERMITIAN   21

Error code for "The matrix passed doesn't appear to be hermitian (%g vs. tolerance %g)".

Definition at line 268 of file cvm.h.

#define CVM_BREAKS_HERMITIANITY   22

Error code for "This operation could make the matrix non-hermitian. Use %s instead".

Definition at line 269 of file cvm.h.

#define CVM_METHODNOTAVAILABLE   23

Error code for "Function '%s' is not available for class '%s'. See programmer's reference for details".

Definition at line 270 of file cvm.h.

#define CVM_NOTIMPLEMENTED   24

Error code for "Function '%s' is not implemented".

Definition at line 271 of file cvm.h.

#define CVM_CANT_RESIZE_SHARED_MEM   25

Error code for "Can't resize shared memory".

Definition at line 272 of file cvm.h.

#define CVM_NOT_CONJUGATED   26

Error code for "Complex numbers are not conjugated: (%g,%g) vs. (%g,%g) with tolerance %g".

Definition at line 273 of file cvm.h.

#define CVM_WRONGSIZE_LT   27

Error code for "Wrong size: %d < %d".

Definition at line 275 of file cvm.h.

#define CVM_WRONGSIZE_LE   28

Error code for "Wrong size: %d <= %d".

Definition at line 276 of file cvm.h.

#define CVM_INDEX_GT   29

Error code for "Index value %d > %d".

Definition at line 277 of file cvm.h.

#define CVM_INDEX_GE   30

Error code for "Index value %d >= %d".

Definition at line 278 of file cvm.h.

#define CVM_OUTOFRANGE_LTGT   31

Error code for "Index value %d is out of [%d,%d] range".

Definition at line 279 of file cvm.h.

#define CVM_OUTOFRANGE_LTGE   32

Error code for "Index value %d is out of [%d,%d) range".

Definition at line 280 of file cvm.h.

#define CVM_OUTOFRANGE_LTGE1   33

Error code for "Index value %d is out of [%d,%d) range".

Definition at line 281 of file cvm.h.

#define CVM_OUTOFRANGE_LTGE2   34

Error code for "Index value %d is out of [%d,%d) range".

Definition at line 282 of file cvm.h.

#define CVM_SIZESMISMATCH_GT   35

Error code for "Sizes mismatch: %d > %d".

Definition at line 283 of file cvm.h.

#define CVM_SIZESMISMATCH_LT   36

Error code for "Sizes mismatch: %d > %d".

Definition at line 284 of file cvm.h.

#define CVM_THE_LAST_ERROR_CODE   37

Error code to be used it in derived classes while defining user error codes.

Definition at line 286 of file cvm.h.

#define CVM_MATRIX_ELEMENT_SEPARATOR   " "

Definition at line 287 of file cvm.h.

#define CVM_EOL   std::endl

Definition at line 288 of file cvm.h.

#define CVM_NAMESPACE_BEG   namespace cvm {

Definition at line 296 of file cvm.h.

#define CVM_NAMESPACE_END   }

Definition at line 297 of file cvm.h.

#define XERBLA   xerbla_

BLAS callback error handler, don't use.

Definition at line 37276 of file cvm.h.

Typedef Documentation

typedef int tint

Either 32 of 64 bit (when CVM_ILP64 is defined) signed integer.

Definition at line 42 of file cvm.h.

typedef unsigned char tbyte

memory allocation quantum

Definition at line 290 of file cvm.h.

typedef double treal

Either double (default) of float (when CVM_FLOAT is defined)

Definition at line 37087 of file cvm.h.

typedef std::complex<treal> tcomplex

Complex nymber type defined as std::complex<treal> (see also treal)

Definition at line 37090 of file cvm.h.

End-user class: array of integers, see basic_array.

Definition at line 37092 of file cvm.h.

End-user class: vector of real numbers, see basic_rvector.

Definition at line 37093 of file cvm.h.

End-user class: matrix of real numbers, see basic_rmatrix.

Definition at line 37094 of file cvm.h.

End-user class: square matrix of real numbers, see basic_srmatrix.

Definition at line 37095 of file cvm.h.

End-user class: vector of complex numbers, see basic_cvector.

Definition at line 37096 of file cvm.h.

End-user class: matrix of complex numbers, see basic_cmatrix.

Definition at line 37097 of file cvm.h.

End-user class: square matrix of complex numbers, see basic_scmatrix.

Definition at line 37098 of file cvm.h.

End-user class: square band matrix of real numbers, see basic_srbmatrix.

Definition at line 37099 of file cvm.h.

End-user class: square band matrix of complex numbers, see basic_scbmatrix.

Definition at line 37100 of file cvm.h.

End-user class: square symmetric matrix of real numbers, see basic_srsmatrix.

Definition at line 37101 of file cvm.h.

End-user class: square hermitian matrix of complex numbers, see basic_schmatrix.

Definition at line 37102 of file cvm.h.

Function Documentation

template<typename T >
T* cvmMalloc ( tint  nEls) throw (cvmexception)
inline

define this to use Memory Pool Manager (not used by default sinse version 6.0)

Memory allocator

Calls "::new[]" by default.

See Also
CVM_USE_POOL_MANAGER
Parameters
[in]nElsNumber of elements of type T to allocate.

Definition at line 902 of file cvm.h.

template<typename T >
tint cvmFree ( T *&  pd)
inline

Memory deallocator.

Calls "::delete[]" by default.

See Also
CVM_USE_POOL_MANAGER

Definition at line 915 of file cvm.h.

CVM_API void cvmExit ( )

Memory pool destroyer.

To be used with Pool Manager only. Does nothing otherwise.

See Also
CVM_USE_POOL_MANAGER

Definition at line 493 of file globals.cpp.

template<typename T >
void cvmZeroMemory ( T *  p,
tint  nEls 
)
inline

Memory cleaner.

Fills memory array with zeros.

Parameters
[in]pPointer to memory array.
[in]nElsNumber of elements to clean.
See Also
tint

Definition at line 943 of file cvm.h.

template<typename T , typename TR >
std::ostream& operator<< ( std::ostream &  os,
const type_proxy< T, TR > &  mOut 
)
inline

Sends proxy value to output stream.

Definition at line 1005 of file cvm.h.

template<typename T , typename TR >
std::istream& operator>> ( std::istream &  is,
type_proxy< T, TR > &  v 
)
inline

Reads proxy value from input stream.

Definition at line 1016 of file cvm.h.

template<typename TR , typename TC >
std::istream& operator>> ( std::istream &  is,
basic_array< TR, TC > &  aIn 
)

Reads basic_array from input stream.

Inserts elements from input stream to array.

Example:
using namespace cvm;
std::cout.setf (std::ios::scientific | std::ios::left);
std::cout.precision (2);
try {
std::ofstream os;
os.open ("in.txt");
os << 1.2 << " " << 2.3 << std::endl << 3.4;
os.close ();
std::ifstream is("in.txt");
rvector v(5);
is >> v;
std::cout << v;
}
catch (std::exception& e) {
std::cout << "Exception " << e.what () << std::endl;
}
prints
1.20e+000 2.30e+000 3.40e+000 0.00e+000 0.00e+000
Parameters
[in]isStream to read from.
[out]aInbasic_array to write to.
Returns
Reference to stream for further reading.

Definition at line 1061 of file cvm.h.

Here is the call graph for this function:

template<typename TR , typename TC >
std::ostream& operator<< ( std::ostream &  os,
const basic_array< TR, TC > &  aOut 
)

Writes basic_array to output stream.

Inserts elements of array to output stream.

Example:
using namespace cvm;
std::cout.setf (std::ios::scientific | std::ios::left);
std::cout.precision (2);
cvector v(3);
v(1) = tcomplex (1., 2.);
v(2) = tcomplex (3., 4.);
std::cout << v;
prints
(1.00e+000,2.00e+000) (3.00e+000,4.00e+000) (0.00e+000,0.00e+000)
Parameters
[out]osStream to write to.
[in]aOutbasic_array to write from.
Returns
Reference to stream for further writing.

Definition at line 1098 of file cvm.h.

template<typename TR , typename TC >
std::istream& operator>> ( std::istream &  is,
Matrix< TR, TC > &  mIn 
)

Reads Matrix from input stream.

Operator fills calling Matrix (row by row) referenced by parameter mIn with numbers from is stream.

Example:
using namespace cvm;
std::cout.setf (std::ios::scientific | std::ios::left);
std::cout.precision (2);
try {
std::ofstream os;
os.open ("in.txt");
os << 1.2 << " " << 2.3 << std::endl << 3.4;
os.close ();
std::ifstream is("in.txt");
rmatrix m(3,2);
is >> m;
std::cout << m;
}
catch (std::exception& e) {
std::cout << "Exception " << e.what () << std::endl;
}
prints
1.20e+000 2.30e+000
3.40e+000 0.00e+000
0.00e+000 0.00e+000
Parameters
[in]isStream to read from.
[out]mInMatrix to write to.
Returns
Reference to stream for further reading.

Definition at line 1151 of file cvm.h.

Here is the call graph for this function:

template<typename TR , typename TC >
std::ostream& operator<< ( std::ostream &  os,
const Matrix< TR, TC > &  mOut 
)

Writes Matrix to output stream.

Operator writes matrix (row by row) referenced by parameter mOut into os stream.

Example:
using namespace cvm;
std::cout.setf (std::ios::scientific | std::ios::left);
std::cout.precision (2);
srmatrix m(3);
m(1,1) = 1.;
m(2,3) = 3.;
std::cout << m;
prints
1.00e+00 0.00e+00 0.00e+00
0.00e+00 0.00e+00 3.00e+00
0.00e+00 0.00e+00 0.00e+00
Parameters
[out]osStream to write to.
[in]mOutMatrix to write from.
Returns
Reference to stream for further writing.

Definition at line 1194 of file cvm.h.

template<typename T , typename TR >
std::complex<TR> operator+ ( const std::complex< TR > &  u,
const type_proxy< T, TR > &  p 
)
inline

Prefix version for proxy.

Definition at line 1687 of file cvm.h.

Here is the call graph for this function:

template<typename T , typename TR >
std::complex<TR> operator- ( const std::complex< TR > &  u,
const type_proxy< T, TR > &  p 
)
inline

Prefix version for proxy.

Definition at line 1693 of file cvm.h.

Here is the call graph for this function:

template<typename T , typename TR >
std::complex<TR> operator* ( const std::complex< TR > &  u,
const type_proxy< T, TR > &  p 
)
inline

Prefix version for proxy.

Definition at line 1699 of file cvm.h.

Here is the call graph for this function:

Here is the caller graph for this function:

template<typename T , typename TR >
std::complex<TR> operator/ ( const std::complex< TR > &  u,
const type_proxy< T, TR > &  p 
)
inline

Prefix version for proxy.

Definition at line 1705 of file cvm.h.

Here is the call graph for this function:

template<typename U , typename T , typename TR >
T operator+ ( u,
const type_proxy< T, TR > &  p 
)
inline

Prefix version for proxy.

Definition at line 1711 of file cvm.h.

Here is the call graph for this function:

template<typename U , typename T , typename TR >
T operator- ( u,
const type_proxy< T, TR > &  p 
)
inline

Prefix version for proxy.

Definition at line 1717 of file cvm.h.

Here is the call graph for this function:

template<typename U , typename T , typename TR >
T operator* ( u,
const type_proxy< T, TR > &  p 
)
inline

Prefix version for proxy.

Definition at line 1723 of file cvm.h.

Here is the call graph for this function:

template<typename U , typename T , typename TR >
T operator/ ( u,
const type_proxy< T, TR > &  p 
)
inline

Prefix version for proxy.

Definition at line 1729 of file cvm.h.

Here is the call graph for this function:

template<typename TR >
basic_rvector<TR> operator* ( TR  d,
const basic_rvector< TR > &  v 
)
inline

Left-sided scalar multiplication.

Definition at line 36955 of file cvm.h.

template<typename TR >
basic_rmatrix<TR> operator* ( TR  d,
const basic_rmatrix< TR > &  m 
)
inline

Left-sided scalar multiplication.

Definition at line 36960 of file cvm.h.

template<typename TR >
basic_srmatrix<TR> operator* ( TR  d,
const basic_srmatrix< TR > &  m 
)
inline

Left-sided scalar multiplication.

Definition at line 36965 of file cvm.h.

template<typename TR >
basic_srbmatrix<TR> operator* ( TR  d,
const basic_srbmatrix< TR > &  m 
)
inline

Left-sided scalar multiplication.

Definition at line 36970 of file cvm.h.

template<typename TR >
basic_srsmatrix<TR> operator* ( TR  d,
const basic_srsmatrix< TR > &  m 
)
inline

Left-sided scalar multiplication.

Definition at line 36975 of file cvm.h.

template<typename TR , typename TC >
basic_cvector<TR,TC> operator* ( TR  d,
const basic_cvector< TR, TC > &  v 
)
inline

Left-sided scalar multiplication.

Definition at line 36981 of file cvm.h.

template<typename TR , typename TC >
basic_cmatrix<TR,TC> operator* ( TR  d,
const basic_cmatrix< TR, TC > &  m 
)
inline

Left-sided scalar multiplication.

Definition at line 36986 of file cvm.h.

template<typename TR , typename TC >
basic_scmatrix<TR,TC> operator* ( TR  d,
const basic_scmatrix< TR, TC > &  m 
)
inline

Left-sided scalar multiplication.

Definition at line 36991 of file cvm.h.

template<typename TR , typename TC >
basic_scbmatrix<TR,TC> operator* ( TR  d,
const basic_scbmatrix< TR, TC > &  m 
)
inline

Left-sided scalar multiplication.

Definition at line 36996 of file cvm.h.

template<typename TR , typename TC >
basic_schmatrix<TR,TC> operator* ( TR  d,
const basic_schmatrix< TR, TC > &  m 
)
inline

Left-sided scalar multiplication.

Definition at line 37001 of file cvm.h.

template<typename TR , typename TC >
basic_cvector<TR,TC> operator* ( std::complex< TR >  c,
const basic_cvector< TR, TC > &  v 
)
inline

Left-sided scalar multiplication.

Definition at line 37007 of file cvm.h.

template<typename TR , typename TC >
basic_cmatrix<TR,TC> operator* ( std::complex< TR >  c,
const basic_cmatrix< TR, TC > &  m 
)
inline

Left-sided scalar multiplication.

Definition at line 37012 of file cvm.h.

template<typename TR , typename TC >
basic_scmatrix<TR,TC> operator* ( std::complex< TR >  c,
const basic_scmatrix< TR, TC > &  m 
)
inline

Left-sided scalar multiplication.

Definition at line 37017 of file cvm.h.

template<typename TR , typename TC >
basic_scbmatrix<TR,TC> operator* ( std::complex< TR >  c,
const basic_scbmatrix< TR, TC > &  m 
)
inline

Left-sided scalar multiplication.

Definition at line 37022 of file cvm.h.

template<typename TR , typename TC >
basic_scmatrix<TR,TC> operator* ( std::complex< TR >  c,
const basic_schmatrix< TR, TC > &  m 
)
inline

Left-sided scalar multiplication (hermiticity gets lost here)

Definition at line 37027 of file cvm.h.

template<typename TR >
basic_rvector<TR> operator* ( CVM_LONGEST_INT  d,
const basic_rvector< TR > &  v 
)
inline

Left-sided scalar multiplication.

Definition at line 37033 of file cvm.h.

template<typename TR >
basic_rmatrix<TR> operator* ( CVM_LONGEST_INT  d,
const basic_rmatrix< TR > &  m 
)
inline

Left-sided scalar multiplication.

Definition at line 37038 of file cvm.h.

template<typename TR >
basic_srmatrix<TR> operator* ( CVM_LONGEST_INT  d,
const basic_srmatrix< TR > &  m 
)
inline

Left-sided scalar multiplication.

Definition at line 37043 of file cvm.h.

template<typename TR >
basic_srbmatrix<TR> operator* ( CVM_LONGEST_INT  d,
const basic_srbmatrix< TR > &  m 
)
inline

Left-sided scalar multiplication.

Definition at line 37048 of file cvm.h.

template<typename TR >
basic_srsmatrix<TR> operator* ( CVM_LONGEST_INT  d,
const basic_srsmatrix< TR > &  m 
)
inline

Left-sided scalar multiplication.

Definition at line 37053 of file cvm.h.

template<typename TR , typename TC >
basic_cvector<TR,TC> operator* ( CVM_LONGEST_INT  d,
const basic_cvector< TR, TC > &  v 
)
inline

Left-sided scalar multiplication.

Definition at line 37059 of file cvm.h.

template<typename TR , typename TC >
basic_cmatrix<TR,TC> operator* ( CVM_LONGEST_INT  d,
const basic_cmatrix< TR, TC > &  m 
)
inline

Left-sided scalar multiplication.

Definition at line 37064 of file cvm.h.

template<typename TR , typename TC >
basic_scmatrix<TR,TC> operator* ( CVM_LONGEST_INT  d,
const basic_scmatrix< TR, TC > &  m 
)
inline

Left-sided scalar multiplication.

Definition at line 37069 of file cvm.h.

template<typename TR , typename TC >
basic_scbmatrix<TR,TC> operator* ( CVM_LONGEST_INT  d,
const basic_scbmatrix< TR, TC > &  m 
)
inline

Left-sided scalar multiplication.

Definition at line 37074 of file cvm.h.

template<typename TR , typename TC >
basic_schmatrix<TR,TC> operator* ( CVM_LONGEST_INT  d,
const basic_schmatrix< TR, TC > &  m 
)
inline

Left-sided scalar multiplication.

Definition at line 37079 of file cvm.h.

template<typename TR >
const basic_srmatrix<TR> basic_eye_real ( tint  nM)
inline

Real identity matrix creation.

Definition at line 37107 of file cvm.h.

template<typename TR , typename TC >
const basic_scmatrix<TR,TC> basic_eye_complex ( tint  nM)
inline

Complex identity matrix creation.

Definition at line 37115 of file cvm.h.

const srmatrix eye_real ( tint  nM)
inline

Real identity matrix creation.

Definition at line 37123 of file cvm.h.

const scmatrix eye_complex ( tint  nM)
inline

Complex identity matrix creation.

Definition at line 37127 of file cvm.h.

treal cvmMachMin ( )
inline

The smallest normalized positive number.

Returns the smallest normalized positive number, i.e. numeric_limits<treal>::min().

Example:
using namespace cvm;
std::cout.setf (std::ios::scientific | std::ios::showpos);
std::cout.precision (15);
std::cout << cvmMachMin() << std::endl;
on Intel Pentium III machine prints
+2.225073858507201e-308
See Also
cvmMachSp()
Returns
treal The number

Definition at line 37150 of file cvm.h.

treal cvmMachSp ( )
inline

The largest relative spacing.

Returns the largest relative spacing, i.e. the difference between 1 and the least value greater than 1 that is representable, i.e. numeric_limits<treal>::epsilon().

Example:
using namespace cvm;
std::cout.setf (std::ios::scientific | std::ios::showpos);
std::cout.precision (15);
std::cout << cvmMachSp() << std::endl;
on Intel Pentium III machine prints
+2.220446049250313e-016
See Also
cvmMachMin()
Returns
treal The number

Definition at line 37175 of file cvm.h.

void __stdcall XERBLA ( const char *  szSubName,
const tint pnParam 
) throw (cvm::cvmexception)

Definition at line 16 of file globals.cpp.