MapLink Pro 11.2
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
Loading...
Searching...
No Matches
TSLOptPathCost Class Reference

Detailed Description

This class represents the cost of traversing a link in the network. The default implementation of operator() simply return the length of the link augmented by any associated turn relation. Clients should provide derived classes in order to provide their own problem-specific cost definition.

Public Types

typedef double distance_type
 

Public Member Functions

virtual distance_type operator() (const TSLOptLink &link, const TSLOptTurn &turn, distance_type cost) const
 

Static Public Attributes

static const distance_type infinity
 
static const distance_type zero
 

Member Typedef Documentation

◆ distance_type

Member Function Documentation

◆ operator()()

virtual distance_type TSLOptPathCost::operator() ( const TSLOptLink & link,
const TSLOptTurn & turn,
distance_type cost ) const
virtual

Computes the cost of traversing the supplied link (incluing negotiating the turn).

Parameters
linkA reference to the current link.
turnA reference to the associated turn.
costThe current cost of getting to the link's source node.
Returns
the cost of traversing the link and negotiating the turn.

Member Data Documentation

◆ infinity

const distance_type TSLOptPathCost::infinity
static

Represents an infinite distance.

◆ zero

const distance_type TSLOptPathCost::zero
static

Represents zero distance.