Relacs  0.9.8
Public Member Functions | List of all members
TableData Class Reference

#include <tabledata.h>

Public Member Functions

 TableData (void)
 
 TableData (int cols, int rows=1000)
 
 TableData (const TableKey &key, int rows=1000)
 
 TableData (const TableData &table)
 
 ~TableData (void)
 
int size (void) const
 
int rows (void) const
 
int maxRows (void) const
 
int columns (void) const
 
void resize (int cols, int rows)
 
void resize (int rows)
 
void reserve (int rows)
 
void clear (void)
 
TableDataoperator= (const TableData &table)
 
void assign (const TableData &table)
 
double & operator() (int col, int row)
 
const double & operator() (int col, int row) const
 
ArrayDcol (int col)
 
const ArrayDcol (int col) const
 
ArrayDoperator[] (int col)
 
const ArrayDoperator[] (int col) const
 
ArrayD row (int row) const
 
void push (int col, double val)
 
void erase (int row)
 
const TableDataoperator++ (void)
 
const TableDataoperator+= (int r)
 
TableDatasort (int scol)
 

Detailed Description

Table for number and strings.

Author
Jan Benda
Version
1.0
Bug:
This is just a quick shot! Feel free to make it better!

Constructor & Destructor Documentation

TableData ( void  )
TableData ( int  cols,
int  rows = 1000 
)

Create a table with cols columns and reserve space for rows rows.

References TableData::resize().

TableData ( const TableKey key,
int  rows = 1000 
)

Create a table with tha same number of columns as key and reserve space for rows rows.

References TableKey::columns(), TableData::resize(), and TableData::rows().

TableData ( const TableData table)

Copy constructor.

References TableData::assign().

~TableData ( void  )

References TableData::clear().

Member Function Documentation

int size ( void  ) const
inline
int rows ( void  ) const
inline
int maxRows ( void  ) const
inline

Referenced by DataFile::scanDataLine().

int columns ( void  ) const
inline
void resize ( int  cols,
int  rows 
)
void resize ( int  rows)
void reserve ( int  rows)
void clear ( void  )

Clear the rows, but keep the number of columns.

Referenced by DataFile::close(), DataFile::initData(), and TableData::~TableData().

TableData & operator= ( const TableData table)

Copy table to *this.

References TableData::assign().

void assign ( const TableData table)

Make *this a copy of table.

References TableData::col(), TableData::columns(), and TableData::rows().

Referenced by TableData::operator=(), and TableData::TableData().

double& operator() ( int  col,
int  row 
)
inline
const double& operator() ( int  col,
int  row 
) const
inline
ArrayD& col ( int  col)
inline
const ArrayD& col ( int  col) const
inline

References Array< T >::clear().

ArrayD& operator[] ( int  col)
inline
const ArrayD& operator[] ( int  col) const
inline
ArrayD row ( int  row) const

References TableData::columns().

void push ( int  col,
double  val 
)
inline

Referenced by DataFile::scanDataLine().

void erase ( int  row)
const TableData& operator++ ( void  )
inline
const TableData& operator+= ( int  r)
inline
TableData & sort ( int  scol)

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