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

Detailed Description

This class represents the cost of traversing a link in the network. The default implementation of operator() simply returns 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 TSLLink &link, const TSLTurn &turn) const
 

Static Public Attributes

static const distance_type infinity
 
static const distance_type zero
 

Member Typedef Documentation

◆ distance_type

This type describes the distance object (double).

Member Function Documentation

◆ operator()()

virtual distance_type TSLPathCost::operator() ( const TSLLink & link,
const TSLTurn & turn ) const
virtual

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

Parameters
linkA reference to the current link.
turnA reference to the associated turn.
Returns
the cost of traversing the link and negotiating the turn.

Member Data Documentation

◆ infinity

const distance_type TSLPathCost::infinity
static

Represents an infinite distance.

◆ zero

const distance_type TSLPathCost::zero
static

Represents zero distance.