#include <SparseVector.h>
Public Member Functions | |
int | argmax () |
int | argSampleDist () const |
string | convToString (unsigned char *bytes) |
void | copyFrom (const SparseVector &x) |
void | copyIndex (vector< int > &result) |
void | copyValue (vector< REAL_VALUE > &result) |
REAL_VALUE | delta (const SparseVector &x) const |
int | filled (void) const |
void | finalize () |
REAL_VALUE | getEntropy () |
string | getHashFromCVector (SparseVector &x) |
string | getHashFromSparseVectorTruncated (SparseVector &x) |
bool | isDifferentByAtLeastSingleEntry (const SparseVector &x, const REAL_VALUE &threshold) const |
REAL_VALUE | maskedSum (vector< int > mask) |
string | md5HashValue () |
REAL_VALUE | norm_1 () |
double | norm_2 () |
double | norm_inf () |
REAL_VALUE | operator() (int index) const |
void | operator*= (REAL_VALUE s) |
void | operator+= (const SparseVector &x) |
void | operator-= (const SparseVector &x) |
bool | operator== (const SparseVector &x) const |
void | push_back (int index, REAL_VALUE value) |
void | read (std::istream &in) |
void | resize (int _size) |
int | sampleState () const |
int | size (void) const |
SparseVector (void) | |
SparseVector (int _size) | |
string | ToString () const |
REAL_VALUE | totalDifference (const SparseVector &x) const |
REAL_VALUE | totalHashDifference (const SparseVector &x) const |
std::ostream & | write (std::ostream &out) const |
virtual | ~SparseVector (void) |
Public Attributes | |
vector< SparseVector_Entry > | data |
Protected Member Functions | |
void | add (SparseVector &result, const SparseVector &x, const SparseVector &y) |
void | subtract (SparseVector &result, const SparseVector &x, const SparseVector &y) |
Protected Attributes | |
int | logicalSize |
string | md5hash |
Friends | |
class | DenseVector |
class | SparseMatrix |
Definition at line 31 of file SparseVector.h.
momdp::SparseVector::SparseVector | ( | void | ) |
Definition at line 166 of file SparseVector.cpp.
momdp::SparseVector::SparseVector | ( | int | _size | ) | [inline] |
Definition at line 61 of file SparseVector.h.
momdp::SparseVector::~SparseVector | ( | void | ) | [virtual] |
Definition at line 171 of file SparseVector.cpp.
void momdp::SparseVector::add | ( | SparseVector & | result, |
const SparseVector & | x, | ||
const SparseVector & | y | ||
) | [protected] |
Definition at line 18 of file SparseVector.cpp.
int momdp::SparseVector::argmax | ( | ) |
Definition at line 229 of file SparseVector.cpp.
int momdp::SparseVector::argSampleDist | ( | ) | const |
Definition at line 177 of file SparseVector.cpp.
string momdp::SparseVector::convToString | ( | unsigned char * | bytes | ) |
Definition at line 532 of file SparseVector.cpp.
void momdp::SparseVector::copyFrom | ( | const SparseVector & | x | ) | [inline] |
Definition at line 37 of file SparseVector.h.
void momdp::SparseVector::copyIndex | ( | vector< int > & | result | ) |
Definition at line 281 of file SparseVector.cpp.
void momdp::SparseVector::copyValue | ( | vector< REAL_VALUE > & | result | ) |
Definition at line 290 of file SparseVector.cpp.
REAL_VALUE momdp::SparseVector::delta | ( | const SparseVector & | x | ) | const |
Definition at line 334 of file SparseVector.cpp.
int momdp::SparseVector::filled | ( | void | ) | const [inline] |
Definition at line 129 of file SparseVector.h.
void momdp::SparseVector::finalize | ( | ) |
Definition at line 506 of file SparseVector.cpp.
Definition at line 86 of file SparseVector.cpp.
string momdp::SparseVector::getHashFromCVector | ( | SparseVector & | x | ) |
Definition at line 548 of file SparseVector.cpp.
Definition at line 581 of file SparseVector.cpp.
bool momdp::SparseVector::isDifferentByAtLeastSingleEntry | ( | const SparseVector & | x, |
const REAL_VALUE & | threshold | ||
) | const |
Definition at line 192 of file SparseVector.cpp.
REAL_VALUE momdp::SparseVector::maskedSum | ( | vector< int > | mask | ) |
Definition at line 266 of file SparseVector.cpp.
string momdp::SparseVector::md5HashValue | ( | ) |
Definition at line 515 of file SparseVector.cpp.
REAL_VALUE momdp::SparseVector::norm_1 | ( | ) | [inline] |
Definition at line 104 of file SparseVector.h.
double momdp::SparseVector::norm_2 | ( | ) | [inline] |
Definition at line 114 of file SparseVector.h.
double momdp::SparseVector::norm_inf | ( | ) | [inline] |
Definition at line 93 of file SparseVector.h.
REAL_VALUE momdp::SparseVector::operator() | ( | int | index | ) | const |
Definition at line 243 of file SparseVector.cpp.
void momdp::SparseVector::operator*= | ( | REAL_VALUE | s | ) |
Definition at line 257 of file SparseVector.cpp.
void momdp::SparseVector::operator+= | ( | const SparseVector & | x | ) |
Definition at line 301 of file SparseVector.cpp.
void momdp::SparseVector::operator-= | ( | const SparseVector & | x | ) |
Definition at line 308 of file SparseVector.cpp.
bool momdp::SparseVector::operator== | ( | const SparseVector & | x | ) | const |
Definition at line 315 of file SparseVector.cpp.
void momdp::SparseVector::push_back | ( | int | index, |
REAL_VALUE | value | ||
) |
Definition at line 448 of file SparseVector.cpp.
void momdp::SparseVector::read | ( | std::istream & | in | ) |
Definition at line 453 of file SparseVector.cpp.
void momdp::SparseVector::resize | ( | int | _size | ) |
Definition at line 442 of file SparseVector.cpp.
int momdp::SparseVector::sampleState | ( | ) | const |
Definition at line 382 of file SparseVector.cpp.
int momdp::SparseVector::size | ( | void | ) | const [inline] |
Definition at line 128 of file SparseVector.h.
void momdp::SparseVector::subtract | ( | SparseVector & | result, |
const SparseVector & | x, | ||
const SparseVector & | y | ||
) | [protected] |
Definition at line 97 of file SparseVector.cpp.
string momdp::SparseVector::ToString | ( | ) | const |
Definition at line 482 of file SparseVector.cpp.
REAL_VALUE momdp::SparseVector::totalDifference | ( | const SparseVector & | x | ) | const |
Definition at line 354 of file SparseVector.cpp.
REAL_VALUE momdp::SparseVector::totalHashDifference | ( | const SparseVector & | x | ) | const |
Definition at line 397 of file SparseVector.cpp.
std::ostream & momdp::SparseVector::write | ( | std::ostream & | out | ) | const |
Definition at line 466 of file SparseVector.cpp.
friend class DenseVector [friend] |
Definition at line 34 of file SparseVector.h.
friend class SparseMatrix [friend] |
Definition at line 33 of file SparseVector.h.
vector< SparseVector_Entry > momdp::SparseVector::data |
Definition at line 43 of file SparseVector.h.
int momdp::SparseVector::logicalSize [protected] |
Definition at line 48 of file SparseVector.h.
string momdp::SparseVector::md5hash [protected] |
Definition at line 57 of file SparseVector.h.