a dummy CvrStgFile implementation to facilitate testing and debugging
#include <DummyFile.h>
◆ DummyFile()
DummyFile::DummyFile |
( |
UWORD16 |
s, |
|
|
std::vector< std::vector< bool > > * |
svam |
|
) |
| |
construct a DummyFile object containing the sample values 0,1,...,s-1
- Parameters
-
s | the size of the DummyFile (i.e. the number of samples it should contain) |
svam | the SampleValueAdjacencyMatrix for the Samples in this file |
◆ createGraph()
create a BitString, a DummyFile and a Selector that together will produce a graph like described by the adjacency list
- Parameters
-
adjlist | an adjacency list describing the "target graph" |
bs | will be filled with the BitString |
f | will be filled with the DummyFile |
s | will be filled with the Selector |
Constructing a Graph object with "Graph (*f, **bs, **s)" will result in a graph of the form of adjlist.
The constructed graph has the following form: SamplesPerVertex == 2, EmbValueModulus = 2 every vertex has a sample value with bit == 0 at index 0 and one with bit == 1 at index 1, if two vertices are adjacent, one end of the edge is at index 0 of the vertex with the lower vertex label and the other end of the edge is at index 1 of the vertex with the higher vertex label. The distance between vertex with label i and vertex with label j is : 2*|j - i| + 1
◆ getNumSamples()
unsigned long DummyFile::getNumSamples |
( |
void |
| ) |
const |
|
virtual |
◆ getProperties()
◆ getSampleValue()
get the sample at position pos
- Parameters
-
- Returns
- the sample at the given position
The sample object is created in this function and should be deleted by the caller. The derived class should check the condition(s) given above in its Implementation of this function.
Implements CvrStgObject.
◆ getSampleValueAdjacencyMatrix()
std::vector< std::vector< bool > > * DummyFile::getSampleValueAdjacencyMatrix |
( |
| ) |
const |
|
inline |
◆ replaceSample()
replace a sample thus (possibly) altering the value of the bit returned by SampleValue->getBit()
- Parameters
-
pos | the position of the sample (must be in 0...getNumSamples()-1) |
s | the sample value that should replace the current sample value (must be of correct type for this CvrStgObject) |
The derived class should check the condition(s) given above in its Implementation of this function.
Implements CvrStgObject.
◆ EmbValueModulus
const EmbValue DummyFile::EmbValueModulus = 2 |
|
staticprivate |
◆ Samples
std::vector<UWORD16> DummyFile::Samples |
|
private |
◆ SamplesPerVertex
const unsigned short DummyFile::SamplesPerVertex = 2 |
|
staticprivate |
◆ SampleValueAdjacencyMatrix
std::vector<std::vector<bool> >* DummyFile::SampleValueAdjacencyMatrix |
|
private |
The documentation for this class was generated from the following files: