WSF
wsf::comm::LeastHops Class Reference

#include <WsfCommRoutingAlgorithmLibrary.hpp>

Inherits graph::GraphImpl::cost_func.

Public Member Functions

 LeastHops ()=default
 ~LeastHops () 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

This header provides some pre-defined routing algorithm classes for use with protocol implementations for correct pathfinding of a WsfCommGraph object. Users should extend this namespace for use of custom defined algorithm classes.

The least hops class finds the shortest path based on the least amount of edges traversed to the destination, regardless of edge cost.

Constructor & Destructor Documentation

◆ LeastHops()

wsf::comm::LeastHops::LeastHops ( )
default

◆ ~LeastHops()

wsf::comm::LeastHops::~LeastHops ( )
overridedefault

Member Function Documentation

◆ consider_node()

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

◆ operator()() [1/2]

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

◆ operator()() [2/2]

double wsf::comm::LeastHops::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