MTK++ Latest version: 0.2.0

Public Member Functions | Protected Member Functions | Protected Attributes
MTKpp::table< T > Class Template Reference

Extension of eigen::matrix to store labels. More...

#include <mtkpp/src/Statistics/table.h>

List of all members.

Public Member Functions

 table ()
 table Constructor
virtual ~table ()
 table Destructor
void setName (std::string n)
 Set the name of the table.
std::string getName ()
 Get the name of the table.
void setType (std::string n)
 Set the type of the table.
std::string getType ()
 Get the type of the table.
void setNumColumns (const int &i)
 Set the number of columns in the table.
int getNumColumns ()
 Get the number of columns in the table.
void setColumnLabel (const int &i, std::string s)
 Set a column label in the table.
void setColumnLabels (std::vector< std::string > v)
 Set column labels.
std::string getColumnLabel (const int &i)
 Get column label.
std::vector< std::string > getColumnLabels ()
 Get column labels.
void setRowLabels (std::vector< std::string > v)
 Set row labels.
std::string getRowLabel (const int &i)
 Get row label.
std::vector< std::string > getRowLabels ()
 Get row labels.
void setNumRows (const int &i)
 Set the number of rows in the table.
int getNumRows ()
 Get the number of rows in the table.
void setRowLabel (const int &i, std::string s)
 Set a row label in the table.
void setSizes (const int &i, const int &j)
 Set the number of columns and rows in the table.
void setup ()
 table setup
void setCellValue (const int &i, const int &j, T v)
 Set the value of a cell in the table.
getCellValue (const int &i, const int &j)
 Get the value of a cell in the table.
void print ()
 Print table to the screen.
void printRow (const int &r)
 Print row of table to the screen.
void printMatrix ()
 Print table matrix to the screen.
Eigen::Matrix< T, Dynamic,
Dynamic > & 
getMatrix ()
 Get the matrix of type M which the table stores.
void sortByColumn (int j, int order)
 Print table matrix to the screen.
void initialize (double t)
 Initialize.
void initialize (int t)
 Initialize.
void initialize (std::string t)
 Initialize.
 table ()
 table Constructor
virtual ~table ()
 table Destructor
void setName (std::string n)
 Set the name of the table.
std::string getName ()
 Get the name of the table.
void setType (std::string n)
 Set the type of the table.
std::string getType ()
 Get the type of the table.
void setNumColumns (const int &i)
 Set the number of columns in the table.
int getNumColumns ()
 Get the number of columns in the table.
void setColumnLabel (const int &i, std::string s)
 Set a column label in the table.
void setColumnLabels (std::vector< std::string > v)
 Set column labels.
std::string getColumnLabel (const int &i)
 Get column label.
std::vector< std::string > getColumnLabels ()
 Get column labels.
void setRowLabels (std::vector< std::string > v)
 Set row labels.
std::string getRowLabel (const int &i)
 Get row label.
std::vector< std::string > getRowLabels ()
 Get row labels.
void setNumRows (const int &i)
 Set the number of rows in the table.
int getNumRows ()
 Get the number of rows in the table.
void setRowLabel (const int &i, std::string s)
 Set a row label in the table.
void setSizes (const int &i, const int &j)
 Set the number of columns and rows in the table.
void setup ()
 table setup
void setCellValue (const int &i, const int &j, T v)
 Set the value of a cell in the table.
getCellValue (const int &i, const int &j)
 Get the value of a cell in the table.
void print ()
 Print table to the screen.
void printRow (const int &r)
 Print row of table to the screen.
void printMatrix ()
 Print table matrix to the screen.
ublas::matrix< T > & getMatrix ()
 Get the matrix of type M which the table stores.
void sortByColumn (int j, int order)
 Print table matrix to the screen.
void initialize (double t)
 Initialize.
void initialize (int t)
 Initialize.
void initialize (std::string t)
 Initialize.

Protected Member Functions

void setSize (const int &i, const int &j)
 Set the dimensions of the table.
void initializeAll ()
void setSize (const int &i, const int &j)
 Set the dimensions of the table.
void initializeAll ()

Protected Attributes

std::string itsName
 Name.
std::string itsType
 Type.
int nColumns
 Number of columns.
std::vector< std::string > columnLabels
 Columns labels.
int nRows
 Number of rows.
std::vector< std::string > rowLabels
 Row labels.
Eigen::Matrix< T, Dynamic,
Dynamic > 
itsMatrix
 matrix of type T
ublas::matrix< T > itsMatrix
 matrix of type T

Detailed Description

template<class T>
class MTKpp::table< T >

Extension of eigen::matrix to store labels.

Extension of ublas::matrix to store labels.

Author:
Martin Peters
Date:
2007

Constructor & Destructor Documentation

template<class T>
MTKpp::table< T >::table ( ) [inline]

table Constructor

template<class T>
virtual MTKpp::table< T >::~table ( ) [inline, virtual]

table Destructor

template<class T>
MTKpp::table< T >::table ( ) [inline]

table Constructor

template<class T>
virtual MTKpp::table< T >::~table ( ) [inline, virtual]

table Destructor


Member Function Documentation

template<class T>
void MTKpp::table< T >::setName ( std::string  n) [inline]
template<class T>
std::string MTKpp::table< T >::getName ( ) [inline]

Get the name of the table.

Returns:
table name

Referenced by MTKpp::table< int >::print().

template<class T>
void MTKpp::table< T >::setType ( std::string  n) [inline]

Set the type of the table.

Parameters:
ntable name
template<class T>
std::string MTKpp::table< T >::getType ( ) [inline]

Get the type of the table.

Returns:
table name
template<class T>
void MTKpp::table< T >::setNumColumns ( const int &  i) [inline]

Set the number of columns in the table.

Parameters:
inumber of columns
template<class T>
int MTKpp::table< T >::getNumColumns ( ) [inline]

Get the number of columns in the table.

Returns:
number of columns

Referenced by main(), MTKpp::pca::pca(), and MTKpp::pls::pls().

template<class T>
void MTKpp::table< T >::setColumnLabel ( const int &  i,
std::string  s 
) [inline]

Set a column label in the table.

Parameters:
icolumn index
slabel

Referenced by MTKpp::dMParser::import(), main(), and MTKpp::pca::run().

template<class T>
void MTKpp::table< T >::setColumnLabels ( std::vector< std::string >  v) [inline]

Set column labels.

Parameters:
vcolumn labels
template<class T>
std::string MTKpp::table< T >::getColumnLabel ( const int &  i) [inline]

Get column label.

Parameters:
icolumn index
Returns:
column label

Referenced by MTKpp::pca::run().

template<class T>
std::vector<std::string> MTKpp::table< T >::getColumnLabels ( ) [inline]

Get column labels.

Returns:
column labels
template<class T>
void MTKpp::table< T >::setRowLabels ( std::vector< std::string >  v) [inline]

Set row labels.

Parameters:
vrow labels
template<class T>
std::string MTKpp::table< T >::getRowLabel ( const int &  i) [inline]

Get row label.

Parameters:
irow index
Returns:
row labels

Referenced by MTKpp::pca::run().

template<class T>
std::vector<std::string> MTKpp::table< T >::getRowLabels ( ) [inline]

Get row labels.

Returns:
row labels
template<class T>
void MTKpp::table< T >::setNumRows ( const int &  i) [inline]

Set the number of rows in the table.

Parameters:
inumber of rows
template<class T>
int MTKpp::table< T >::getNumRows ( ) [inline]

Get the number of rows in the table.

Returns:
number of rows

Referenced by main(), MTKpp::pca::pca(), and MTKpp::pls::pls().

template<class T>
void MTKpp::table< T >::setRowLabel ( const int &  i,
std::string  s 
) [inline]

Set a row label in the table.

Parameters:
irow index
slabel

Referenced by MTKpp::dMParser::import(), and MTKpp::pca::run().

template<class T>
void MTKpp::table< T >::setSizes ( const int &  i,
const int &  j 
) [inline]

Set the number of columns and rows in the table.

Parameters:
inumber of rows
jnumber of columns

Referenced by MTKpp::dMParser::import(), main(), MTKpp::gaussianParser::Read(), MTKpp::gaussianParser::readFormattedChkPtFile(), MTKpp::pca::run(), and MTKpp::pls::runCV().

template<class T>
void MTKpp::table< T >::setup ( ) [inline]

table setup

template<class T>
void MTKpp::table< T >::setCellValue ( const int &  i,
const int &  j,
v 
) [inline]

Set the value of a cell in the table.

Parameters:
irow index
jcolumn index
vcell value

Referenced by MTKpp::dMParser::import(), main(), and MTKpp::gaussianParser::Read().

template<class T>
T MTKpp::table< T >::getCellValue ( const int &  i,
const int &  j 
) [inline]

Get the value of a cell in the table.

Parameters:
irow index
jcolumn index
Returns:
cell value

Referenced by main().

template<class T>
void MTKpp::table< T >::print ( ) [inline]

Print table to the screen.

Referenced by main().

template<class T>
void MTKpp::table< T >::printRow ( const int &  r) [inline]

Print row of table to the screen.

template<class T>
void MTKpp::table< T >::printMatrix ( ) [inline]

Print table matrix to the screen.

template<class T>
Eigen::Matrix<T, Dynamic, Dynamic>& MTKpp::table< T >::getMatrix ( ) [inline]
template<class T>
void MTKpp::table< T >::sortByColumn ( int  j,
int  order 
) [inline]

Print table matrix to the screen.

Parameters:
jcolumn to be sorted
orderAscending = 0, Desending = 1
template<class T>
void MTKpp::table< T >::initialize ( double  t) [inline]

Initialize.

Referenced by main(), and MTKpp::gaussianParser::Read().

template<class T>
void MTKpp::table< T >::initialize ( int  t) [inline]

Initialize.

template<class T>
void MTKpp::table< T >::initialize ( std::string  t) [inline]

Initialize.

template<class T>
void MTKpp::table< T >::setSize ( const int &  i,
const int &  j 
) [inline, protected]

Set the dimensions of the table.

Referenced by MTKpp::table< int >::setSizes(), and MTKpp::table< int >::setup().

template<class T>
void MTKpp::table< T >::initializeAll ( ) [inline, protected]
template<class T>
void MTKpp::table< T >::setName ( std::string  n) [inline]

Set the name of the table.

Parameters:
ntable name
template<class T>
std::string MTKpp::table< T >::getName ( ) [inline]

Get the name of the table.

Returns:
table name
template<class T>
void MTKpp::table< T >::setType ( std::string  n) [inline]

Set the type of the table.

Parameters:
ntable name
template<class T>
std::string MTKpp::table< T >::getType ( ) [inline]

Get the type of the table.

Returns:
table name
template<class T>
void MTKpp::table< T >::setNumColumns ( const int &  i) [inline]

Set the number of columns in the table.

Parameters:
inumber of columns
template<class T>
int MTKpp::table< T >::getNumColumns ( ) [inline]

Get the number of columns in the table.

Returns:
number of columns
template<class T>
void MTKpp::table< T >::setColumnLabel ( const int &  i,
std::string  s 
) [inline]

Set a column label in the table.

Parameters:
icolumn index
slabel
template<class T>
void MTKpp::table< T >::setColumnLabels ( std::vector< std::string >  v) [inline]

Set column labels.

Parameters:
vcolumn labels
template<class T>
std::string MTKpp::table< T >::getColumnLabel ( const int &  i) [inline]

Get column label.

Parameters:
icolumn index
Returns:
column label
template<class T>
std::vector<std::string> MTKpp::table< T >::getColumnLabels ( ) [inline]

Get column labels.

Returns:
column labels
template<class T>
void MTKpp::table< T >::setRowLabels ( std::vector< std::string >  v) [inline]

Set row labels.

Parameters:
vrow labels
template<class T>
std::string MTKpp::table< T >::getRowLabel ( const int &  i) [inline]

Get row label.

Parameters:
irow index
Returns:
row labels
template<class T>
std::vector<std::string> MTKpp::table< T >::getRowLabels ( ) [inline]

Get row labels.

Returns:
row labels
template<class T>
void MTKpp::table< T >::setNumRows ( const int &  i) [inline]

Set the number of rows in the table.

Parameters:
inumber of rows
template<class T>
int MTKpp::table< T >::getNumRows ( ) [inline]

Get the number of rows in the table.

Returns:
number of rows
template<class T>
void MTKpp::table< T >::setRowLabel ( const int &  i,
std::string  s 
) [inline]

Set a row label in the table.

Parameters:
irow index
slabel
template<class T>
void MTKpp::table< T >::setSizes ( const int &  i,
const int &  j 
) [inline]

Set the number of columns and rows in the table.

Parameters:
inumber of rows
jnumber of columns
template<class T>
void MTKpp::table< T >::setup ( ) [inline]

table setup

template<class T>
void MTKpp::table< T >::setCellValue ( const int &  i,
const int &  j,
v 
) [inline]

Set the value of a cell in the table.

Parameters:
irow index
jcolumn index
vcell value
template<class T>
T MTKpp::table< T >::getCellValue ( const int &  i,
const int &  j 
) [inline]

Get the value of a cell in the table.

Parameters:
irow index
jcolumn index
Returns:
cell value
template<class T>
void MTKpp::table< T >::print ( ) [inline]

Print table to the screen.

template<class T>
void MTKpp::table< T >::printRow ( const int &  r) [inline]

Print row of table to the screen.

template<class T>
void MTKpp::table< T >::printMatrix ( ) [inline]

Print table matrix to the screen.

template<class T>
ublas::matrix<T>& MTKpp::table< T >::getMatrix ( ) [inline]

Get the matrix of type M which the table stores.

template<class T>
void MTKpp::table< T >::sortByColumn ( int  j,
int  order 
) [inline]

Print table matrix to the screen.

Parameters:
jcolumn to be sorted
orderAscending = 0, Desending = 1
template<class T>
void MTKpp::table< T >::initialize ( double  t) [inline]

Initialize.

template<class T>
void MTKpp::table< T >::initialize ( int  t) [inline]

Initialize.

template<class T>
void MTKpp::table< T >::initialize ( std::string  t) [inline]

Initialize.

template<class T>
void MTKpp::table< T >::setSize ( const int &  i,
const int &  j 
) [inline, protected]

Set the dimensions of the table.

template<class T>
void MTKpp::table< T >::initializeAll ( ) [inline, protected]

Member Data Documentation

template<class T>
std::string MTKpp::table< T >::itsName [protected]
template<class T>
std::string MTKpp::table< T >::itsType [protected]
template<class T>
int MTKpp::table< T >::nColumns [protected]
template<class T>
std::vector< std::string > MTKpp::table< T >::columnLabels [protected]
template<class T>
int MTKpp::table< T >::nRows [protected]
template<class T>
std::vector< std::string > MTKpp::table< T >::rowLabels [protected]
template<class T>
Eigen::Matrix<T, Dynamic, Dynamic> MTKpp::table< T >::itsMatrix [protected]
template<class T>
ublas::matrix<T> MTKpp::table< T >::itsMatrix [protected]

matrix of type T


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

Generated on Fri Dec 23 2011 09:28:58 for MTK++ by Doxygen 1.7.5.1