Fréchet View  1.6.0
A Tool for Exploring Fréchet Distance Algorithms
frechet::fs::GridAxis Class Reference

Detailed Description

a grid axis maps the segments of the input curve to an axis of the free-space diagram.

Input curve P is mapped to the x-axis. Input curve Q is mapped to the y-axis.

The GridAxis class keeps a list of segment lengths.

In addition we assign line styles for visualisation.

Author
Peter Schäfer

Definition at line 42 of file grid.h.

#include <grid.h>

Inherits vector< data::Interval >.

Public Member Functions

 GridAxis ()
 empty constructor More...
 
void setCurve (const Curve &P)
 compute the length of each polygon segment More...
 
void setLineStyles (const LineStyleVector &linesStyles, LineStyle defaultLineStyle)
 assign line styles for visualisation More...
 
LineStyle lineStyle (int i) const
 
double map (double x) const
 maps a value from [0..n] onto the axis [0..|P|] More...
 
data::Interval map (const Interval &other) const
 maps an interval from [0..n] onto the axis [0..|P|] More...
 
double length () const
 

Private Attributes

LineStyle defaultLineStyle
 default line style for drawing a grid line More...
 
LineStyleVector lineStyles
 custom line styles for grid lines More...
 

Constructor & Destructor Documentation

◆ GridAxis()

GridAxis::GridAxis ( )

empty constructor

Definition at line 8 of file grid.cpp.

Member Function Documentation

◆ length()

double GridAxis::length ( ) const
Returns
total length of the axis == total length of the associated input curve

Definition at line 60 of file grid.cpp.

◆ lineStyle()

LineStyle GridAxis::lineStyle ( int  i) const
Parameters
icolumn, or row in grid
Returns
the line style for drawing a grid line

Definition at line 35 of file grid.cpp.

◆ map() [1/2]

double GridAxis::map ( double  x) const

maps a value from [0..n] onto the axis [0..|P|]

Parameters
xoffset from [0..n]
Returns
offset into [0..|P|]

Definition at line 44 of file grid.cpp.

◆ map() [2/2]

Interval GridAxis::map ( const Interval other) const

maps an interval from [0..n] onto the axis [0..|P|]

Parameters
otherinterval from [0..n]
Returns
interval into [0..|P|]

Definition at line 54 of file grid.cpp.

◆ setCurve()

void GridAxis::setCurve ( const Curve P)

compute the length of each polygon segment

Parameters
Pan input curve

Definition at line 14 of file grid.cpp.

◆ setLineStyles()

void GridAxis::setLineStyles ( const LineStyleVector linesStyles,
LineStyle  defaultLineStyle 
)

assign line styles for visualisation

Parameters
linesStyleslist of line styles
defaultLineStyledefault line style

Definition at line 28 of file grid.cpp.

Member Data Documentation

◆ defaultLineStyle

LineStyle frechet::fs::GridAxis::defaultLineStyle
private

default line style for drawing a grid line

Definition at line 46 of file grid.h.

◆ lineStyles

LineStyleVector frechet::fs::GridAxis::lineStyles
private

custom line styles for grid lines

Definition at line 48 of file grid.h.


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