WSF
wsf::comm::InverseEdgeWeight Class Reference

#include <WsfCommRoutingAlgorithmLibrary.hpp>

Inherits graph::GraphImpl::cost_func.

Public Member Functions

 InverseEdgeWeight ()=default
 ~InverseEdgeWeight () override=default
double operator() (const graph::Edge &aEdge, const graph::Node &aSourceNode, const graph::Node &aDestinationNode) const override
double operator() (const graph::Node &aSourceNode, const graph::Node &aDestinationNode) const override
bool consider_node (const graph::Node &aNode) const override

Detailed Description

Exactly the same as the EdgeWeight algorithm, with the exception that weights are subtracted from a max value to invert the edge weights. This is useful for some edge weights where a higher assigned value actually indicates a "better" weight. Users using this algorithm must be mindful that the reported costs return by the FindPath algorithm will reflect the added value for inversion.

Constructor & Destructor Documentation

◆ InverseEdgeWeight()

wsf::comm::InverseEdgeWeight::InverseEdgeWeight ( )
default

◆ ~InverseEdgeWeight()

wsf::comm::InverseEdgeWeight::~InverseEdgeWeight ( )
overridedefault

Member Function Documentation

◆ consider_node()

bool wsf::comm::InverseEdgeWeight::consider_node ( const graph::Node & aNode) const
inlineoverride

◆ operator()() [1/2]

double wsf::comm::InverseEdgeWeight::operator() ( const graph::Edge & aEdge,
const graph::Node & aSourceNode,
const graph::Node & aDestinationNode ) const
inlineoverride

◆ operator()() [2/2]

double wsf::comm::InverseEdgeWeight::operator() ( const graph::Node & aSourceNode,
const graph::Node & aDestinationNode ) const
inlineoverride

The documentation for this class was generated from the following file:
Copyrights Multiple, All Rights Reserved