PPL API Reference
Overview Core Algorithm Abstractions Utilities Parallel Methods
Modules Class Hierarchy Classes Functions
Todo List Bug List Dead Code
List of all members
Neighbor Struct Referencefinal

Public Member Functions

Construction
 Neighbor ()
 
 Neighbor (const VID _target, const double _distance)
 
 Neighbor (const VID _source, const VID _target, const double _distance)
 
Equality
bool operator== (const Neighbor &_other) const noexcept
 Checks equality with another Neighbor.
 
bool operator!= (const Neighbor &_other) const noexcept
 Checks inequality with another Neighbor.
 

Public Types

Local Types
typedef size_t VID
 
typedef std::function< bool(const Neighbor &_a, const Neighbor &_b)> Comparator
 

Public Attributes

Internal State
VID source {VID(-1)}
 The source VID.
 
VID target {VID(-1)}
 The target VID.
 
double distance {std::numeric_limits<double>::infinity()}
 The distance between source and target.
 

Ordering

There are several ways to order a set of neighbors. The default is to order only by distance. The static functions here give alternate comparators that can be used to select the desired ordering.

bool operator< (const Neighbor &_other) const noexcept
 Orders by distance only.
 
static Comparator OrderByDistanceThenTarget () noexcept
 Orders by distance, then target VID.
 
static Comparator OrderByDistanceThenSource () noexcept
 Orders by distance, then source VID.
 
static Comparator OrderByAll () noexcept
 Orders by distance, then source, then target.
 

Detailed Description

Describes a distance relation between two cfgs as determined by a neighborhood finder. At least one of the cfgs should be in the roadmap.

Member Typedef Documentation

◆ Comparator

typedef std::function<bool(const Neighbor& _a, const Neighbor& _b)> Neighbor::Comparator

A function for comparing two neighbors for ordering purposes. Returns true if _a is ordered before _b.


The documentation for this struct was generated from the following file: