Public Member Functions | List of all members
compare_edge Struct Reference

A struct that provides the comparison of edge objects. It allows sorting of edges for priority queues. The sorting follows three rules: First, edges are sorted by ascending cost. Edges with the same cost are sorted preferring horizontal/vertical edges. Edges with same cost and orientation are sorted ascending by vertical/horizontal position. More...

#include <edge.h>

Public Member Functions

bool operator() (const edge &a, const edge &b) const
 Compare two edge objects. Edges are compared in terms of cost, orientation, and the position. More...
 

Detailed Description

A struct that provides the comparison of edge objects. It allows sorting of edges for priority queues. The sorting follows three rules: First, edges are sorted by ascending cost. Edges with the same cost are sorted preferring horizontal/vertical edges. Edges with same cost and orientation are sorted ascending by vertical/horizontal position.

Definition at line 52 of file edge.h.

Member Function Documentation

bool compare_edge::operator() ( const edge a,
const edge b 
) const

Compare two edge objects. Edges are compared in terms of cost, orientation, and the position.

Parameters
aFirst edge.
bSecond edge.
Returns
True, if the cost of the first edge is lower than of the second edge. If both edges have the same cost, it differentiates between horizontal or vertical sweeping patterns. If horizontal/vertical, true if the difference between the vertex indexes of the first edge is greater/lower or equal than of the second edge. If both edges have the same cost and vertex index difference, true if the vertex index of first edge is lower than of the second edge. False otherwise.

Definition at line 12 of file edge.cpp.


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


coverage_path
Author(s): Micha Sende
autogenerated on Tue Jan 19 2021 03:30:03