SVector Class Reference

#include <vectors.h>

List of all members.

Public Member Functions

 SVector ()
 SVector (const FVector &v)
int size () const
double get (int i) const
double set (int i, double v)
int npairs () const
 operator const Pair * () const
void clear ()
void trim ()
SVector slice (int fi, int ti) const
void add (const SVector &v2)
void add (const SVector &v2, double c2)
void scale (double c1)
void combine (double c1, const SVector &v2, double c2)
bool save (std::ostream &f) const
bool load (std::istream &f)
double loadString (std::string str)
void loadFromString (std::string str)
void loadFromString (std::string str1, std::string str2)
int fromPSQL (std::string str)
 Parses given database string and convert it into SVector.
double getSpaceUsed ()
 Calculates the space used by the SVector.
bool loadStrStream (std::istream &)
void * write_bin (size_t &total_size)
 Writes the SVector as a binary data.
int read_bin (void *data, size_t length)
 Reads the SVector from the given binary data.

Private Member Functions

Reprep ()
const Reprep () const

Private Attributes

Wrapper< Repw


std::ostream & operator<< (std::ostream &f, const SVector &v)
std::istream & operator>> (std::istream &f, SVector &v)
SVector combine (const SVector &v1, double a1, const SVector &v2, double a2)


struct  Pair
struct  Rep

Constructor & Destructor Documentation

SVector::SVector (  ) 

SVector::SVector ( const FVector v  ) 

Member Function Documentation

void SVector::add ( const SVector v2,
double  c2 

void SVector::add ( const SVector v2  ) 

void SVector::clear (  ) 

void SVector::combine ( double  c1,
const SVector v2,
double  c2 

int SVector::fromPSQL ( std::string  str  ) 

Parses given database string and convert it into SVector.

[in] str database string format of SVector

double SVector::get ( int  i  )  const

double SVector::getSpaceUsed (  ) 

Calculates the space used by the SVector.

space used by SVector in bytes

bool SVector::load ( std::istream &  f  ) 

void SVector::loadFromString ( std::string  str1,
std::string  str2 

void SVector::loadFromString ( std::string  str  ) 

double SVector::loadString ( std::string  str  ) 

bool SVector::loadStrStream ( std::istream &   ) 

int SVector::npairs (  )  const [inline]

SVector::operator const Pair * (  )  const [inline]

int SVector::read_bin ( void *  data,
size_t  length 

Reads the SVector from the given binary data.

[in] data void pointer to the binary data
[in] length of the data in bytes
# of elements in SVector

const Rep* SVector::rep (  )  const [inline, private]

Rep* SVector::rep (  )  [inline, private]

bool SVector::save ( std::ostream &  f  )  const

void SVector::scale ( double  c1  ) 

double SVector::set ( int  i,
double  v 

int SVector::size (  )  const [inline]

SVector SVector::slice ( int  fi,
int  ti 
) const

void SVector::trim (  ) 

void * SVector::write_bin ( size_t &  total_size  ) 

Writes the SVector as a binary data.

[out] total_size of the binary data written
void pointer to the binary data which is constructor by this method

Friends And Related Function Documentation

SVector combine ( const SVector v1,
double  a1,
const SVector v2,
double  a2 
) [friend]

std::ostream& operator<< ( std::ostream &  f,
const SVector v 
) [friend]

std::istream& operator>> ( std::istream &  f,
SVector v 
) [friend]

Member Data Documentation

Wrapper<Rep> SVector::w [private]

The documentation for this class was generated from the following files:
Generated on Wed Dec 15 10:46:16 2010 for Hazy_System by  doxygen 1.4.7