Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

flexibletable.h File Reference

The header file for class FlexibleTable<T>, and some internal methods. More...

This graph shows which files directly or indirectly include this file:


Classes

class  FlexibleTable< T >
 FlexibleTable<T> is intended for reading a table of columnar data from a file. More...

Functions

template<typename T>
size_t StringToVector (std::vector< T > &vec, const std::string line, size_t size_guess)
 Reads a string into a vector<T> (ignoring [,], and #-commented lines!) and return number of items read. Used by FlexibleTable.
std::istream & eatwhite (std::istream &input)
 Fast-forward a stream pointer past all whitespace. Used by FlexibleTable.
template<class T>
std::istream & ReadComplex (std::istream &input, std::complex< T > &Z)
 Reads a complex number from a stream, and stores it in Z. Used by FlexibleTable.
template<class T>
std::complex< T > BuildComplex (T *real, bool *iflag, bool *negflag)
 Turns real into {+1,-1,+I,-I}*real, depending on flags. Used by FlexibleTable.
template<class T>
std::ostream & PrettyOutput (std::ostream &os, const T &var)
 PrettyOutput outputs a variable of type T to a stream; defaults to <<, but can be specialized, e.g. for std::complex<T>. Used by FlexibleTable.
template<class T>
std::ostream & PrettyOutput (std::ostream &output, const std::complex< T > &Z)
 (Template specialization) Prints a std::complex<T> to a stream, in "ai+b" form.
template<class T>
size_t StringToVector (std::vector< std::complex< T > > &vec, const std::string line, size_t size_guess)

Detailed Description

The header file for class FlexibleTable<T>, and some internal methods.

FlexibleTable is designed to ease reading columnar data from a file. The FlexibleTable class and its helper functions are defined here. Helper functions are: eatwhite(), BuildComplex(), ReadComplex(), and StringToVector().


Function Documentation

template<class T>
size_t StringToVector std::vector< std::complex< T > > &  vec,
const std::string  line,
size_t  size_guess
 

Specialization of StringToVector for std::complex<T> uses my ReadComplex function instead of >> operator in order to read "ai+b" and "a+bi" formats.


Generated on Wed Jun 14 22:25:27 2006 for linalg by  doxygen 1.4.4