Class for maintaining a nearest neighbour graph over superpixel images. Search moves are implemented by templated functions in the drwnNNGraphMoves namespace.
More...
|
|
| drwnNNGraph () |
| | default constructor
|
| |
|
virtual | ~drwnNNGraph () |
| | destructor
|
| |
|
bool | write (const char *filestem) const |
| | write to persistent storage
|
| |
|
bool | read (const char *filestem) |
| | read from persistent storage
|
| |
|
void | clear () |
| | clear the entire graph
|
| |
|
void | reserve (size_t n) |
| | reserve a given number of images (reduced memory allocation)
|
| |
|
drwnNNGraph | clone (bool bWithFeatures=true) const |
| | clone the graph (with or without node features)
|
| |
|
size_t | numImages () const |
| | number of images in the graph
|
| |
|
size_t | numNodes () const |
| | number of nodes (superpixels) in the graph
|
| |
|
size_t | numEdges () const |
| | number of edges in the graph
|
| |
|
size_t | numNodesWithLabel (int label) const |
| | count the number of nodes (superpixels) with a given label
|
| |
|
int | findImage (const string &baseName) const |
| | returns the index for an image or -1 if not in graph
|
| |
|
int | appendImage (const string &baseName, unsigned numNodes=0) |
| | add a single image and return its index (do not use while the graph is being learned)
|
| |
|
int | appendImage (const drwnNNGraphImage &image) |
| | add a drwnNNGraphImage and return its index (do not use while the graph is being learned)
|
| |
|
int | removeImage (unsigned imgIndx) |
| | delete an image from the graph (do not use while the graph is being learned) and returns the number of edges removed which terminated at nodes within the deleted image
|
| |
|
pair< double, double > | energy () const |
| | sum of all edge weights (first) and best edge weights (second)
|
| |
|
bool | inSameEqvClass (unsigned imgIndxA, unsigned imgIndxB) const |
| | return true if two images are in the same equivalence class
|
| |
|
const drwnNNGraphImage & | operator[] (size_t indx) const |
| | returns const reference to an image (and its nodes)
|
| |
|
drwnNNGraphImage & | operator[] (size_t indx) |
| | returns reference an image (and its nodes)
|
| |
|
const drwnNNGraphImage & | operator[] (const string &baseName) const |
| | returns const reference to an image (and its nodes)
|
| |
|
drwnNNGraphImage & | operator[] (const string &baseName) |
| | returns reference an image (and its nodes)
|
| |
|
const drwnNNGraphNode & | operator[] (const drwnNNGraphNodeIndex &indx) const |
| | returns const reference to a node
|
| |
|
drwnNNGraphNode & | operator[] (const drwnNNGraphNodeIndex &indx) |
| | returns reference a node
|
| |
Class for maintaining a nearest neighbour graph over superpixel images. Search moves are implemented by templated functions in the drwnNNGraphMoves namespace.