Fréchet View  1.6.0
A Tool for Exploring Fréchet Distance Algorithms
frechet::reach::GraphModelAxis Class Reference

Detailed Description

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.

Author
Peter Schäfer

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 BoundsIndexlookup (double x) const
 look up a value and map it to a graph node More...
 
const BoundsIndexlookupLowerEqual (double x) const
 look up a node that is lower or equal to value More...
 
const BoundsIndexlookupLarger (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, BoundsIndexMap
 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
 

Member Typedef Documentation

◆ Map

typedef boost::container::map<double,BoundsIndex> frechet::reach::GraphModelAxis::Map
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.

Constructor & Destructor Documentation

◆ GraphModelAxis()

GraphModelAxis::GraphModelAxis ( )

empty constructor

Definition at line 114 of file graph_model.cpp.

Member Function Documentation

◆ createReverseMap()

void GraphModelAxis::createReverseMap ( std::vector< Interval > &  result) const

create a reverse mapping; mapping graph nodes to free-space intervals

Parameters
resulta list of free-space intervals

Definition at line 192 of file graph_model.cpp.

◆ indexify()

void GraphModelAxis::indexify ( int  start)
private

assign graph node indexes to all values (intervals)

Parameters
startinitiali nodex index

Definition at line 181 of file graph_model.cpp.

◆ insert1()

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)

Parameters
xboundary value
biasinclusive to adjacent intervals?

Definition at line 116 of file graph_model.cpp.

◆ insert2()

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)

Parameters
xboundary value
biasNote: 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.

◆ lookup()

const BoundsIndex & GraphModelAxis::lookup ( double  x) const

look up a value and map it to a graph node

Parameters
xa point in free-space
Returns
associated graph node index

Definition at line 147 of file graph_model.cpp.

◆ lookupLarger()

const BoundsIndex * GraphModelAxis::lookupLarger ( double  x) const

look up a node that is larger than value

Parameters
xa point in free-space
Returns
associated graph node index, or nullptr if not found

Definition at line 171 of file graph_model.cpp.

◆ lookupLowerEqual()

const BoundsIndex * GraphModelAxis::lookupLowerEqual ( double  x) const

look up a node that is lower or equal to value

Parameters
xa point in free-space
Returns
associated graph node index, or nullptr if not found

Definition at line 155 of file graph_model.cpp.

◆ remove()

void GraphModelAxis::remove ( double  x)
private

remove a value

Parameters
xfree-space point

Definition at line 142 of file graph_model.cpp.

Friends And Related Function Documentation

◆ GraphModel

friend class GraphModel
friend

Definition at line 218 of file graph_model.h.

Member Data Documentation

◆ _dim

int frechet::reach::GraphModelAxis::_dim
private

width or height of the free-space diagram

Definition at line 216 of file graph_model.h.

◆ _max_index

int frechet::reach::GraphModelAxis::_max_index
private

maximum node index

Definition at line 214 of file graph_model.h.

◆ map

Map frechet::reach::GraphModelAxis::map
private

Definition at line 212 of file graph_model.h.


The documentation for this class was generated from the following files: