![]() |
Fréchet View
1.6.0
A Tool for Exploring Fréchet Distance Algorithms
|
model the mapping of free-space intervals to nodes in a frechet::reach::Graph.
Maps reachability intervals (BoundarySegment*) to Graph vertices (indexes for rows/columns of adjacency matrix).
To create comparable Graphs, the boundary intervals must be unified. We use a prototype Structure that conains the "most refined" intervals.
TODO TODO TODO TODO
Test Cases (Google Test?)
Alternatively, we could calculate the prototype intervals by intersecting all Free-Space intervals (saves us the trouble of building a reach::Structure). But that would mainly duplicate code from Structure, so we leave it at that (yet)...
For each horizontal or vertical interval in free-space, there will be a node in the reachability graph.
The model is copmuted by overlaying all free-space intervals.
Accomodates double-free-space diagrams, too. We do not model the duplicated part of the free-space diagram, but the reachability graph does.
Definition at line 109 of file graph_boost.h.
#include <graph_boost.h>
Public Types | |
typedef boost::shared_ptr< GraphModel > | ptr |
smart pointer to a GraphModel object More... | |
Public Member Functions | |
GraphModel () | |
GraphModel (Structure &prototype) | |
void | init (Structure &prototype) |
int | count () const |
void | refine (Structure &str, int i0) const |
void | indexify (Structure &str, int i0) const |
GraphModel () | |
empty constructor More... | |
void | init (const FreeSpace::ptr fs) |
initialize from free-space intervals More... | |
bool | empty () const |
int | dim1 (Orientation ori) const |
int | dim2 (Orientation ori) const |
int | lowerShiftedHorizontally (int hindex) const |
map a node index to its counterpart in the duplicated part of a double-free-space More... | |
IndexRange | shiftedHorizontally (const IndexRange &r) const |
map a node range to its counterpart in the duplicated part of a double-free-space More... | |
int | count2 (Orientation ori) const |
int | count2 () const |
IndexRange | map (Orientation ori, const Interval &, bool upperBoundInclusive) const |
map a free-space interval to a range of graph nodes More... | |
IndexRange | map (Pointer b) const |
map a reachability structure interval to a range of graph nodes More... | |
int | map_lower (Pointer p) const |
map the lower bound of a reachability structure interval More... | |
int | map_upper (Pointer p) const |
map the upper bound of a reachability structure interval More... | |
int | map_lower (Orientation ori, double x) const |
map an interval lower bound More... | |
int | map_upper (Orientation ori, double x, bool inclusive) const |
map an interval upper bound More... | |
IndexRange | mapClosest (Orientation ori, const Interval &ival) const |
map a free-space interval to the closest graph nodes More... | |
const std::vector< Interval > & | reverseMap (Orientation ori) const |
create a reverse map, mapping graph nodes to free-space interval More... | |
IndexRange | mergedHMask (const IndexRange &m1, const IndexRange &m2) const |
merged two node ranges representing the horizontal masks of reachability graph (see frechet::reach::Graph memory layout). More... | |
Private Member Functions | |
BoundaryList & | list (Orientation ori) |
BoundaryList & | horiz () |
BoundaryList & | vert () |
const BoundaryList & | horiz () const |
const BoundaryList & | vert () const |
void | indexify (Structure &str, Orientation ori, const Pointer model) const |
void | refine (Structure &str, Orientation ori, const Pointer model) const |
void | initVertical (const FreeSpace::ptr fs) |
set up the mappings for vertical intervals More... | |
void | initHorizontal (const FreeSpace::ptr fs) |
set up the mappings for horizontal intervals More... | |
Private Attributes | |
BoundaryList | _model [2] |
std::vector< Pointer > | _column_entry |
int | _count |
GraphModelAxis | axis [2] |
horizontal and vertical mapping More... | |
std::vector< Interval > | reversed [2] |
reverse mapping from nodes to intervals (horizontal and vertical) More... | |
typedef boost::shared_ptr<GraphModel> frechet::reach::GraphModel::ptr |
smart pointer to a GraphModel object
Definition at line 307 of file graph_model.h.
frechet::reach::GraphModel::GraphModel | ( | ) |
frechet::reach::GraphModel::GraphModel | ( | Structure & | prototype | ) |
|
inline |
empty constructor
Definition at line 312 of file graph_model.h.
|
inline |
Definition at line 124 of file graph_boost.h.
int GraphModel::count2 | ( | Orientation | ori | ) | const |
ori | horizontal or vertical |
Definition at line 237 of file graph_model.cpp.
int GraphModel::count2 | ( | ) | const |
Definition at line 247 of file graph_model.cpp.
int GraphModel::dim1 | ( | Orientation | ori | ) | const |
ori | horizontal or vertical |
Definition at line 217 of file graph_model.cpp.
int GraphModel::dim2 | ( | Orientation | ori | ) | const |
ori | horizontal or vertical |
Definition at line 227 of file graph_model.cpp.
bool GraphModel::empty | ( | ) | const |
Definition at line 373 of file graph_model.cpp.
|
inlineprivate |
Definition at line 136 of file graph_boost.h.
|
inlineprivate |
Definition at line 139 of file graph_boost.h.
void frechet::reach::GraphModel::indexify | ( | Structure & | str, |
int | i0 | ||
) | const |
|
private |
void frechet::reach::GraphModel::init | ( | Structure & | prototype | ) |
void GraphModel::init | ( | const FreeSpace::ptr | fs | ) |
initialize from free-space intervals
fs | a free-space diagram |
Definition at line 353 of file graph_model.cpp.
|
private |
set up the mappings for horizontal intervals
fs | a free-space |
Definition at line 421 of file graph_model.cpp.
|
private |
set up the mappings for vertical intervals
fs | a free-space |
Definition at line 377 of file graph_model.cpp.
|
inlineprivate |
Definition at line 134 of file graph_boost.h.
|
inline |
map a node index to its counterpart in the duplicated part of a double-free-space
hindex | a reachability graph node index |
Definition at line 342 of file graph_model.h.
IndexRange frechet::reach::GraphModel::map | ( | Orientation | ori, |
const Interval & | , | ||
bool | upperBoundInclusive | ||
) | const |
map a free-space interval to a range of graph nodes
ori | horizontal or vertical |
upperBoundInclusive | is the upper interval bound inclusive? |
IndexRange GraphModel::map | ( | Pointer | b | ) | const |
map a reachability structure interval to a range of graph nodes
b | pointer to a reachability structure interval |
Definition at line 305 of file graph_model.cpp.
int GraphModel::map_lower | ( | Pointer | p | ) | const |
map the lower bound of a reachability structure interval
p | pointer to a reachability structure interval |
Definition at line 311 of file graph_model.cpp.
int GraphModel::map_lower | ( | Orientation | ori, |
double | x | ||
) | const |
map an interval lower bound
ori | horizontal or vertical |
x | a lower bound of a free-space interval |
Definition at line 321 of file graph_model.cpp.
int GraphModel::map_upper | ( | Pointer | p | ) | const |
map the upper bound of a reachability structure interval
p | pointer to a reachability structure interval |
Definition at line 316 of file graph_model.cpp.
int GraphModel::map_upper | ( | Orientation | ori, |
double | x, | ||
bool | inclusive | ||
) | const |
map an interval upper bound
ori | horizontal or vertical |
x | a lower bound of a free-space interval |
inclusive | is the upper bound inclusive? |
Definition at line 327 of file graph_model.cpp.
IndexRange GraphModel::mapClosest | ( | Orientation | ori, |
const Interval & | ival | ||
) | const |
map a free-space interval to the closest graph nodes
ori | horizontal or vertical |
ival | a free-space interval |
Definition at line 290 of file graph_model.cpp.
IndexRange GraphModel::mergedHMask | ( | const IndexRange & | m1, |
const IndexRange & | m2 | ||
) | const |
merged two node ranges representing the horizontal masks of reachability graph (see frechet::reach::Graph memory layout).
m1 | horizontal range of a graph |
m2 | adjacent horizontal range of another graph |
Definition at line 339 of file graph_model.cpp.
void frechet::reach::GraphModel::refine | ( | Structure & | str, |
int | i0 | ||
) | const |
|
private |
|
inline |
create a reverse map, mapping graph nodes to free-space interval
ori | horizontal or vertical |
Definition at line 432 of file graph_model.h.
|
inline |
map a node range to its counterpart in the duplicated part of a double-free-space
r | a range of node indexes |
Definition at line 355 of file graph_model.h.
|
inlineprivate |
Definition at line 137 of file graph_boost.h.
|
inlineprivate |
Definition at line 140 of file graph_boost.h.
|
private |
Definition at line 114 of file graph_boost.h.
|
private |
Definition at line 117 of file graph_boost.h.
|
private |
Definition at line 112 of file graph_boost.h.
|
private |
horizontal and vertical mapping
Definition at line 301 of file graph_model.h.
|
private |
reverse mapping from nodes to intervals (horizontal and vertical)
Definition at line 303 of file graph_model.h.