Collective Variables Module - Developer Documentation
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Attributes | Friends | List of all members
colvarmodule::matrix2d< T > Class Template Reference

Arbitrary size array (two dimensions) suitable for linear algebra operations (i.e. for floating point numbers it can be used with library functions) More...

#include <colvartypes.h>

Classes

class  row
 

Public Member Functions

void resize (size_t const ol, size_t const il)
 Allocation routine, used by all constructors.
 
void clear ()
 Deallocation routine.
 
void reset ()
 Set all elements to zero.
 
size_t size () const
 
 matrix2d ()
 Default constructor.
 
 matrix2d (size_t const ol, size_t const il)
 
 matrix2d (matrix2d< T > const &m)
 Copy constructor.
 
 ~matrix2d ()
 Destructor.
 
std::vector< T > & data_array ()
 Return a reference to the data.
 
rowoperator[] (size_t const i)
 
row const & operator[] (size_t const i) const
 
matrix2d< T > & operator= (matrix2d< T > const &m)
 Assignment.
 
T ** c_array ()
 Return the 2-d C array.
 
void operator+= (matrix2d< T > const &m)
 
void operator-= (matrix2d< T > const &m)
 
void operator*= (cvm::real const &a)
 
void operator/= (cvm::real const &a)
 
std::string to_simple_string () const
 
int from_simple_string (std::string const &s)
 

Static Public Member Functions

static void check_sizes (matrix2d< T > const &m1, matrix2d< T > const &m2)
 

Public Attributes

size_t outer_length
 
size_t inner_length
 

Protected Attributes

std::vector< T > data
 
std::vector< rowrows
 
std::vector< T * > pointers
 

Friends

class row
 
matrix2d< T > operator+ (matrix2d< T > const &m1, matrix2d< T > const &m2)
 
matrix2d< T > operator- (matrix2d< T > const &m1, matrix2d< T > const &m2)
 
matrix2d< T > operator* (matrix2d< T > const &m, cvm::real const &a)
 
matrix2d< T > operator* (cvm::real const &a, matrix2d< T > const &m)
 
matrix2d< T > operator/ (matrix2d< T > const &m, cvm::real const &a)
 
vector1d< T > operator* (vector1d< T > const &v, matrix2d< T > const &m)
 Matrix multiplication. More...
 
std::ostream & operator<< (std::ostream &os, matrix2d< T > const &m)
 Formatted output.
 

Detailed Description

template<class T>
class colvarmodule::matrix2d< T >

Arbitrary size array (two dimensions) suitable for linear algebra operations (i.e. for floating point numbers it can be used with library functions)

Friends And Related Function Documentation

template<class T>
vector1d<T> operator* ( vector1d< T > const &  v,
matrix2d< T > const &  m 
)
friend

Matrix multiplication.

vector-matrix multiplication


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