![]() |
Fréchet View
1.6.0
A Tool for Exploring Fréchet Distance Algorithms
|
manages a mapping between free-space intervals (continous, floating point) to reachability graph nodes (discrete, integer)
Some effort is taken to model free-space intervals consisting of exactly one point. Though this is a border case, it must be properly treated.
Definition at line 207 of file graph_model.h.
#include <graph_model.h>
Public Member Functions | |
| GraphModelAxis () | |
| empty constructor More... | |
| void | insert1 (double x, Bias bias) |
| insert one value, with an optional bias. Initially will be mapped to an invalid Graph node. Later, the entries will be assigned the correct graph nodes (see indexify) More... | |
| void | insert2 (double x, Bias bias) |
| insert a value plus value shifted by free-space width (so that we can model a double-free-space diagram) More... | |
| const BoundsIndex & | lookup (double x) const |
| look up a value and map it to a graph node More... | |
| const BoundsIndex * | lookupLowerEqual (double x) const |
| look up a node that is lower or equal to value More... | |
| const BoundsIndex * | lookupLarger (double x) const |
| look up a node that is larger than value More... | |
| void | createReverseMap (std::vector< Interval > &result) const |
| create a reverse mapping; mapping graph nodes to free-space intervals More... | |
Private Types | |
| typedef boost::container::map< double, BoundsIndex > | Map |
| maps free-space coordinates to graph nodes (identified by node index, with an optional bias to adjacent intervals) More... | |
Private Member Functions | |
| void | remove (double x) |
| remove a value More... | |
| void | indexify (int start) |
| assign graph node indexes to all values (intervals) More... | |
Private Attributes | |
| Map | map |
| int | _max_index |
| maximum node index More... | |
| int | _dim |
| width or height of the free-space diagram More... | |
Friends | |
| class | GraphModel |
|
private |
maps free-space coordinates to graph nodes (identified by node index, with an optional bias to adjacent intervals)
Definition at line 211 of file graph_model.h.
| GraphModelAxis::GraphModelAxis | ( | ) |
empty constructor
Definition at line 114 of file graph_model.cpp.
| void GraphModelAxis::createReverseMap | ( | std::vector< Interval > & | result | ) | const |
create a reverse mapping; mapping graph nodes to free-space intervals
| result | a list of free-space intervals |
Definition at line 192 of file graph_model.cpp.
|
private |
assign graph node indexes to all values (intervals)
| start | initiali nodex index |
Definition at line 181 of file graph_model.cpp.
| void GraphModelAxis::insert1 | ( | double | x, |
| Bias | bias | ||
| ) |
insert one value, with an optional bias. Initially will be mapped to an invalid Graph node. Later, the entries will be assigned the correct graph nodes (see indexify)
| x | boundary value |
| bias | inclusive to adjacent intervals? |
Definition at line 116 of file graph_model.cpp.
| void GraphModelAxis::insert2 | ( | double | x, |
| Bias | bias | ||
| ) |
insert a value plus value shifted by free-space width (so that we can model a double-free-space diagram)
| x | boundary value |
| bias | Note: due to round-off errors, it is possible that one value is inserted and the other one is not. |
As a consequence, the left and right parts of the GraphModel may differ in size. Shifting indexes horizontally must NEVER rely in model size, but ONLY on Interval bounds. (see shiftedHorizontally and Graph::is_adjacent_to)
Definition at line 136 of file graph_model.cpp.
| const BoundsIndex & GraphModelAxis::lookup | ( | double | x | ) | const |
look up a value and map it to a graph node
| x | a point in free-space |
Definition at line 147 of file graph_model.cpp.
| const BoundsIndex * GraphModelAxis::lookupLarger | ( | double | x | ) | const |
look up a node that is larger than value
| x | a point in free-space |
Definition at line 171 of file graph_model.cpp.
| const BoundsIndex * GraphModelAxis::lookupLowerEqual | ( | double | x | ) | const |
look up a node that is lower or equal to value
| x | a point in free-space |
Definition at line 155 of file graph_model.cpp.
|
private |
|
friend |
Definition at line 218 of file graph_model.h.
|
private |
width or height of the free-space diagram
Definition at line 216 of file graph_model.h.
|
private |
maximum node index
Definition at line 214 of file graph_model.h.
|
private |
Definition at line 212 of file graph_model.h.