Relacs
0.9.8
|
#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) |
TableData & | operator= (const TableData &table) |
void | assign (const TableData &table) |
double & | operator() (int col, int row) |
const double & | operator() (int col, int row) const |
ArrayD & | col (int col) |
const ArrayD & | col (int col) const |
ArrayD & | operator[] (int col) |
const ArrayD & | operator[] (int col) const |
ArrayD | row (int row) const |
void | push (int col, double val) |
void | erase (int row) |
const TableData & | operator++ (void) |
const TableData & | operator+= (int r) |
TableData & | sort (int scol) |
Table for number and strings.
TableData | ( | void | ) |
TableData | ( | int | cols, |
int | rows = 1000 |
||
) |
Create a table with cols columns and reserve space for rows rows.
References TableData::resize().
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().
Copy constructor.
References TableData::assign().
~TableData | ( | void | ) |
References TableData::clear().
|
inline |
|
inline |
|
inline |
Referenced by DataFile::scanDataLine().
|
inline |
void resize | ( | int | cols, |
int | rows | ||
) |
References TableData::reserve().
Referenced by TableData::resize(), DataFile::scanDataLine(), and TableData::TableData().
void resize | ( | int | rows | ) |
References TableData::resize(), and TableData::rows().
void reserve | ( | int | rows | ) |
Referenced by TableData::resize(), and DataFile::scanDataLine().
void clear | ( | void | ) |
Clear the rows, but keep the number of columns.
Referenced by DataFile::close(), DataFile::initData(), and TableData::~TableData().
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().
|
inline |
|
inline |
|
inline |
References Array< T >::clear().
Referenced by TableData::assign(), and TableData::sort().
|
inline |
References Array< T >::clear().
|
inline |
|
inline |
ArrayD row | ( | int | row | ) | const |
References TableData::columns().
|
inline |
Referenced by DataFile::scanDataLine().
void erase | ( | int | row | ) |
References TableData::columns(), and TableData::rows().
|
inline |
|
inline |
TableData & sort | ( | int | scol | ) |
Sort rows by column scol.
References TableData::col(), TableData::columns(), Array< T >::empty(), Array< T >::reserve(), and Array< T >::sortedIndex().