TextFileReader Class Reference

Inheritance diagram for TextFileReader:

Inheritance graph
[legend]

List of all members.


Detailed Description

Reader for white-space delimited text files.

Author:
Lawrence Murray <lawrence@indii.org>
Version:
Rev
Date:
Date

Definition at line 22 of file TextFileReader.hpp.


Public Member Functions

 TextFileReader (std::istream *in)
 Construct new reader from input stream, where all columns are of interest.
 TextFileReader (const std::string &file)
 Construct new reader from file, where all columns are of interest.
 TextFileReader (std::istream *in, unsigned int col)
 Construct new reader from input stream, where only a single column is of interest.
 TextFileReader (const std::string &file, unsigned int col)
 Construct new reader from file, where only a single column is of interest.
 TextFileReader (std::istream *in, const std::vector< unsigned int > &cols)
 Construct new reader from input stream, where only a subset of columns are of interest.
 TextFileReader (const std::string &file, const std::vector< unsigned int > &cols)
 Construct new reader from file, where only a subset of columns are of interest.
 ~TextFileReader ()
 Destructor.
virtual unsigned int read (double *into)
 Read next value.
virtual unsigned int read (indii::ml::aux::vector *into)
 Read next values into vector.
virtual unsigned int read (indii::ml::aux::matrix *into)
 Read next values into matrix.
virtual unsigned int read (indii::ml::aux::symmetric_matrix *into)
 Read next values into symmetric matrix.

Constructor & Destructor Documentation

TextFileReader ( std::istream *  in  ) 

Construct new reader from input stream, where all columns are of interest.

Parameters:
in Stream from which to read.

Definition at line 7 of file TextFileReader.cpp.

TextFileReader ( const std::string &  file  ) 

Construct new reader from file, where all columns are of interest.

Parameters:
file Name of file from which to read.

Definition at line 11 of file TextFileReader.cpp.

TextFileReader ( std::istream *  in,
unsigned int  col 
)

Construct new reader from input stream, where only a single column is of interest.

Parameters:
in Stream from which to read.
col Index of column of interest.

Definition at line 15 of file TextFileReader.cpp.

TextFileReader ( const std::string &  file,
unsigned int  col 
)

Construct new reader from file, where only a single column is of interest.

Parameters:
file Name of file from which to read.
col Index of column of interest.

Definition at line 20 of file TextFileReader.cpp.

TextFileReader ( std::istream *  in,
const std::vector< unsigned int > &  cols 
)

Construct new reader from input stream, where only a subset of columns are of interest.

Parameters:
in Stream from which to read.
cols Set of indices giving columns of interest.

Definition at line 25 of file TextFileReader.cpp.

TextFileReader ( const std::string &  file,
const std::vector< unsigned int > &  cols 
)

Construct new reader from file, where only a subset of columns are of interest.

Parameters:
file Name of file from which to read.
cols Set of indices giving columns of interest.

Definition at line 30 of file TextFileReader.cpp.

~TextFileReader (  ) 

Destructor.

Definition at line 35 of file TextFileReader.cpp.


Member Function Documentation

unsigned int read ( double *  into  )  [virtual]

Read next value.

Parameters:
into Double into which to read the value.
Returns:
Number of values actually read. Will be 1 if a value is successfully read, and 0 if the end of the stream is reached during reading.
One value is read from the input stream into into. If a particular column or subset of columns of interest have been specified, all others are skipped during the reading.

Implements Reader.

Definition at line 39 of file TextFileReader.cpp.

unsigned int read ( indii::ml::aux::vector into  )  [virtual]

Read next values into vector.

Parameters:
into Vector into which to read the values.
Returns:
Number of values actually read. Will be less than the size of the given vector if the end of the stream is reached during reading.
into.size() values are read from the input stream into into. If a particular column or subset of columns of interest have been specified, all others are skipped during the reading.

Implements Reader.

Definition at line 62 of file TextFileReader.cpp.

unsigned int read ( indii::ml::aux::matrix into  )  [virtual]

Read next values into matrix.

Parameters:
into Matrix into which to read the values.
Returns:
Number of values actually read. Will be less than the size of the given matrix if the end of the stream is reached during reading.
into.size1() * into.size2() values are read from the input stream into into in column-wise fashion. If a particular column or subset of columns of interest have been specified, all others are skipped during the reading.

Implements Reader.

Definition at line 74 of file TextFileReader.cpp.

unsigned int read ( indii::ml::aux::symmetric_matrix into  )  [virtual]

Read next values into symmetric matrix.

Parameters:
into Matrix into which to read the values.
Returns:
Number of values actually read. Will be less than the size of the lower triangular portion of the given matrix if the end of the stream is reached during reading.
0.5 * (into.size1() * into.size1() + into.size1()) values are read from the input stream into the lower triangle of into in column-wise fashion. If a particular column or subset of columns of interest have been specified, all others are skipped during the reading.

Implements Reader.

Definition at line 90 of file TextFileReader.cpp.


Generated on Wed Dec 17 15:11:58 2008 for dysii Dynamical Systems Library by  doxygen 1.5.3