19 #ifndef __CXXGRAPH_DIRECTEDWEIGHTEDEDGE_H__
20 #define __CXXGRAPH_DIRECTEDWEIGHTEDEDGE_H__
24 #include "DirectedEdge.hpp"
25 #include "Weighted.hpp"
31 class UndirectedWeightedEdge;
34 class DirectedWeightedEdge;
38 std::ostream &operator<<(std::ostream &o,
const DirectedWeightedEdge<T> &edge);
52 const std::optional<bool> isWeighted()
const override;
65 DirectedWeightedEdge<T>::DirectedWeightedEdge(
const unsigned long id,
const std::pair<
const Node<T> *,
const Node<T> *> &nodepair,
const double weight) : DirectedEdge<T>(id, nodepair), Weighted(weight)
70 DirectedWeightedEdge<T>::DirectedWeightedEdge(
const DirectedEdge<T> &edge,
const double weight) : DirectedEdge<T>(edge), Weighted(weight)
75 DirectedWeightedEdge<T>::DirectedWeightedEdge(
const Edge<T> &edge,
const double weight) : DirectedEdge<T>(edge), Weighted(weight)
80 DirectedWeightedEdge<T>::DirectedWeightedEdge(
const DirectedEdge<T> &edge) : DirectedEdge<T>(edge), Weighted()
85 DirectedWeightedEdge<T>::DirectedWeightedEdge(
const Edge<T> &edge) : DirectedEdge<T>(edge), Weighted()
90 DirectedWeightedEdge<T>::DirectedWeightedEdge(
const UndirectedWeightedEdge<T> &edge) : DirectedEdge<T>(edge), Weighted(edge.getWeight())
95 const std::optional<bool> DirectedWeightedEdge<T>::isWeighted()
const
100 template <
typename T>
101 std::ostream &operator<<(std::ostream &os,
const DirectedWeightedEdge<T> &edge)
103 os <<
"((Node: " << edge.getFrom().getId() <<
")) +----- |Edge: #" << edge.getId() <<
" W:" << edge.getWeight() <<
"|-----> ((Node: " << edge.getTo().getId() <<
"))";
Definition: DirectedEdge.hpp:39
Definition: DirectedWeightedEdge.hpp:42
Definition: UndirectedWeightedEdge.hpp:43
Definition: Weighted.hpp:28