17 template <
class SCALAR =
int>
35 Edge &operator=(const
Edge<SCALAR>&) = default;
36 Edge &operator=(
Edge<SCALAR>&&) noexcept = default;
44 bool operator== (const
Edge& rhs) const;
49 bool operator!= (const
Edge& rhs) const;
61 inline
bool exists() const;
145 template <class SCALAR>
146 bool Edge<SCALAR>::operator== (const
Edge<SCALAR>& rhs)
const
148 return src_ == rhs.
src_
149 && dest_ == rhs.dest_
150 && weight_ == rhs.weight_
151 && exists_ == rhs.exists_
152 && color_ == rhs.color_;
155 template <
class SCALAR>
162 template <
class SCALAR>
168 template <
class SCALAR>
174 template <
class SCALAR>
179 template <
class SCALAR>
185 template <
class SCALAR>
190 template <
class SCALAR>
196 template <
class SCALAR>
201 template <
class SCALAR>
207 template <
class SCALAR>
212 template <
class SCALAR>
219 #endif // GL_EDGE_HPP
Stores an RGBA Color.
Definition: Color.hpp:21
idx_t src_
Source index.
Definition: Edge.hpp:133
Color color() const
Gets the edge's color.
Definition: Edge.hpp:208
bool operator!=(const Edge &rhs) const
Check whether two edges are not equal.
Definition: Edge.hpp:156
bool exists_
Edge existance.
Definition: Edge.hpp:136
val_t weight_
Edge weight.
Definition: Edge.hpp:135
std::size_t index_type
Definition: gl_base.hpp:18
Edge(const idx_t &src=0, const idx_t &dest=0, const val_t &weight=0, const Color &color=Color("black"), const bool &exists=false)
Construct Edge from data.
Definition: Edge.hpp:31
idx_t source() const
Gets the index of the source of the edge.
Definition: Edge.hpp:175
Represents an Edge in a Graph.
Definition: Edge.hpp:18
bool exists() const
Checks whether an edge exists.
Definition: Edge.hpp:163
SCALAR val_t
Value type.
Definition: Edge.hpp:21
idx_t dest() const
Gets the index of the destination of the edge.
Definition: Edge.hpp:186
idx_t dest_
Destination index.
Definition: Edge.hpp:134
gl::index_type idx_t
Index type.
Definition: Edge.hpp:22
Color color_
Edge color.
Definition: Edge.hpp:137
val_t weight() const
Gets the weight of the edge.
Definition: Edge.hpp:197
bool operator==(const Edge &rhs) const
Check whether two edges are equal.
Definition: Edge.hpp:146