rshyper_core/traits/
hyper_graph.rs

1/*
2    Appellation: hgraph <module>
3    Contrib: @FL03
4*/
5use crate::{EdgeId, RawIndex, VertexId};
6
7pub trait RawNode {
8    type Idx: RawIndex;
9
10    private!();
11
12    /// Returns the index of the node.
13    fn index(&self) -> &VertexId<Self::Idx>;
14}
15
16pub trait RawEdge {
17    type Idx: RawIndex;
18
19    private!();
20
21    /// Returns the index of the node.
22    fn index(&self) -> &EdgeId<Self::Idx>;
23}
24
25pub trait RawHyperGraph<N, E> {
26    type Idx: RawIndex;
27}
28
29/// [`HyperGraph`] is a trait that defines the basic operations for a hypergraph data structure.
30pub trait HyperGraph<N, E>: RawHyperGraph<N, E> {
31    type Adj<N2, E2>;
32}