#include <vectors.h>
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 | |
Rep * | rep () |
const Rep * | rep () const |
Private Attributes | |
Wrapper< Rep > | w |
Friends | |
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) |
Classes | |
struct | Pair |
struct | Rep |
SVector::SVector | ( | ) |
SVector::SVector | ( | const FVector & | v | ) |
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 | ) |
double SVector::get | ( | int | i | ) | const |
double SVector::getSpaceUsed | ( | ) |
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 | |||
) |
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 |
std::ostream& operator<< | ( | std::ostream & | f, | |
const SVector & | v | |||
) | [friend] |
std::istream& operator>> | ( | std::istream & | f, | |
SVector & | v | |||
) | [friend] |
Wrapper<Rep> SVector::w [private] |