Represents a weighted edge to a node identified by an ID, with an associated weight. More...
#include <edge.h>
Public Types | |
| using | weight_type = W |
| Alias for the weight type. | |
| Public Types inherited from GraphLib::Internal::Edge< I > | |
| using | id_type = I |
| Alias for the node ID type. | |
Public Member Functions | |
| bool | operator< (const WeightedEdge &right) const |
| Less-than operator comparing node IDs and weights. | |
| bool | operator== (const WeightedEdge &other) const |
| Equality operator comparing both node IDs and weights. | |
| template<typename D> requires GraphLib::Internal::is_printable<D> && GraphLib::Internal::valid_data_type<D> | |
| void | print_with_data (std::ostream &os, D value) const |
| Prints an weighted Edge with its data instead of ID. | |
| Public Member Functions inherited from GraphLib::Internal::Edge< I > | |
| bool | operator< (const Edge &right) const |
| Less-than operator comparing node IDs. | |
| bool | operator== (const Edge &other) const |
| Equality operator comparing node IDs. | |
| template<typename D> requires GraphLib::Internal::is_printable<D> && GraphLib::Internal::valid_data_type<D> | |
| void | print_with_data (std::ostream &os, D value) const |
| Prints an unweighted Edge with its data instead of ID. | |
Public Attributes | |
| weight_type | weight {} |
| The weight associated with this edge. | |
| Public Attributes inherited from GraphLib::Internal::Edge< I > | |
| id_type | node_id {} |
| The ID of the node this edge points to. | |
Represents a weighted edge to a node identified by an ID, with an associated weight.
| I | Type of the node ID; must satisfy the valid_id_type concept. |
| W | Type of the edge weight; must satisfy the valid_weight_type concept. |
| using GraphLib::Internal::WeightedEdge< I, W >::weight_type = W |
|
inline |
|
inline |
|
inline |
| weight_type GraphLib::Internal::WeightedEdge< I, W >::weight {} |