SHOGUN
6.0.0
|
class NextSamples is the return type for next() call in DataManager. If there are no more samples (from any one of the distributions), an empty instance of NextSamples is supposed to be returned. This can be verified from the caller by calling the empty() method. Otherwise, always a get() call with appropriate index would give the samples from that distribution. If an inappropriate index is provided, e.g. get(2) for a two-sample test, a runtime exception is thrown.
Example usage:
Definition at line 68 of file NextSamples.h.
Public Member Functions | |
NextSamples & | operator= (const NextSamples &other) |
~NextSamples () | |
std::vector< Block > & | operator[] (size_t i) |
const std::vector< Block > & | operator[] (size_t i) const |
const index_t | num_blocks () const |
const bool | empty () const |
void | clear () |
Friends | |
class | DataManager |
~NextSamples | ( | ) |
Destructor
Definition at line 50 of file NextSamples.cpp.
void clear | ( | ) |
Method that clears the memory occupied by the feature objects inside.
Definition at line 82 of file NextSamples.cpp.
const bool empty | ( | ) | const |
This returns true if any of the distribution fetched 0 blocks (checked from the size of the vector for that distribution)
Definition at line 76 of file NextSamples.cpp.
const index_t num_blocks | ( | ) | const |
Definition at line 71 of file NextSamples.cpp.
NextSamples & operator= | ( | const NextSamples & | other | ) |
Assignment operator. Clears the current blocks.
Definition at line 42 of file NextSamples.cpp.
std::vector< Block > & operator[] | ( | size_t | i | ) |
Contains a number of blocks (of samples) fetched in the current burst from a specified distribution.
i | determines samples from which distribution |
Definition at line 55 of file NextSamples.cpp.
const std::vector< Block > & operator[] | ( | size_t | i | ) | const |
Const version of the above. This is called when a const instance of NextSamples is returned.
Definition at line 63 of file NextSamples.cpp.
|
friend |
Definition at line 70 of file NextSamples.h.