83 #ifndef GUM_GRAPH_ELEMENTS_H 84 #define GUM_GRAPH_ELEMENTS_H 88 #include <agrum/agrum.h> 90 #include <agrum/tools/core/set.h> 154 Edge(NodeId aN1, NodeId aN2);
157 Edge(
const Edge& src);
170 NodeId other(NodeId id)
const;
173 NodeId first()
const;
176 NodeId second()
const;
186 Edge& operator=(
const Edge& src);
191 bool operator==(
const Edge& src)
const;
196 bool operator!=(
const Edge& src)
const;
259 Arc(NodeId tail, NodeId head);
281 NodeId other(NodeId id)
const;
284 NodeId first()
const;
287 NodeId second()
const;
297 Arc& operator=(
const Arc& src);
302 bool operator==(
const Arc& src)
const;
308 bool operator!=(
const Arc& src)
const;
317 void _setTail_(NodeId id);
320 void _setHead_(NodeId id);
329 #ifndef DOXYGEN_SHOULD_SKIP_THIS 332 class HashFunc< Edge >:
public HashFuncBase< Edge > {
339 static Size castToSize(
const Edge& key);
346 virtual Size operator()(
const Edge& key)
const override final;
351 class HashFunc< Arc >:
public HashFuncBase< Arc > {
358 static Size castToSize(
const Arc& key);
365 virtual Size operator()(
const Arc& key)
const override final;
374 typedef Set< NodeId > NodeSet;
375 typedef Set< Edge > EdgeSet;
376 typedef Set< Arc > ArcSet;
378 typedef ArcSet::const_iterator ArcSetIterator;
379 typedef EdgeSet::const_iterator EdgeSetIterator;
380 typedef NodeSet::const_iterator NodeSetIterator;
387 template <
class VAL >
388 using NodeProperty = HashTable< NodeId, VAL >;
389 template <
class VAL >
390 using EdgeProperty = HashTable< Edge, VAL >;
391 template <
class VAL >
392 using ArcProperty = HashTable< Arc, VAL >;
397 std::ostream& operator<<(std::ostream& stream,
const Edge& edge);
400 std::ostream& operator<<(std::ostream& stream,
const Arc& arc);
404 #ifndef GUM_NO_EXTERN_TEMPLATE_CLASS 405 extern template class gum::HashFunc< gum::NodeSet >;
408 #ifndef GUM_NO_INLINE 409 # include <agrum/tools/graphs/graphElements_inl.h>