icentral_muc/
interface.rs

1crate::ix!();
2
3pub trait GraphHashMucInterface
4: ExtendWith<Self> 
5+ Sized
6+ NumNodes 
7+ NumEdges 
8+ GetEdges 
9+ HasMapForNode 
10+ MappedNodes 
11+ InsertEdge 
12+ InsertNode {}
13
14impl<T> GraphHashMucInterface for T where
15T: ExtendWith<Self> 
16+ Sized
17+ NumNodes 
18+ NumEdges 
19+ GetEdges 
20+ HasMapForNode 
21+ MappedNodes 
22+ InsertEdge 
23+ InsertNode {}
24
25pub trait GetMucs<GH> {
26
27    fn get_mucs<'a>(&'a self) -> &Vec<MinimumUnionCycle<GH>>;
28}
29
30pub trait GetMuc<GH> {
31    fn muc(&self, idx: MinimumUnionCycleId) -> &MinimumUnionCycle<GH>;
32    fn muc_mut(&mut self, idx: MinimumUnionCycleId) -> &mut MinimumUnionCycle<GH>;
33}
34
35pub trait FindMucs {
36
37    fn find_mucs_fast(&mut self) 
38    -> Result<(),BetweennessCentralityError>;
39
40    fn find_mucs(&mut self);
41}
42
43pub trait FindMucMcb<GH> {
44
45    fn find_muc_mcb(&mut self) 
46    -> Result<(),BetweennessCentralityError>;
47
48    fn find_muc_mcb_for_cycle(
49        &mut self, 
50        src:           NodeId, 
51        cycle_graph:   &GH, 
52        visit_markers: &mut VisitMarkers) 
53    -> Result<(),BetweennessCentralityError>;
54}
55
56pub trait CollectAllMucEdges {
57
58    fn collect_all_edges_in_mucs_in_one_set(&mut self) 
59    -> Result<Edges,BetweennessCentralityError>;
60}
61
62pub trait ClearMucs {
63
64    fn clear_mucs(&mut self) 
65    -> Result<(),BetweennessCentralityError>;
66}
67
68pub trait MergeMucCycle<GH> {
69
70    fn merge_muc_cycle(
71        &mut self, 
72        muc:   &mut MinimumUnionCycle<GH>,
73        cycle: &Cycle
74    );
75}
76
77pub trait CreateSingleVertexMucs {
78
79    fn create_single_vertex_muc(
80        &mut self, 
81        idx: NodeId
82    );
83
84    fn maybe_create_single_vertex_muc(
85        &mut self, 
86        idx: NodeId
87    );
88
89    fn create_single_vertex_mucs(&mut self);
90}
91
92pub trait FindAllMucSubgraphs {
93
94    fn find_all_muc_subgraphs(&mut self);
95}
96
97pub trait ConstructSingleNodeMucs {
98
99    fn maybe_construct_single_node_muc(&mut self, idx: NodeId);
100    fn construct_single_node_mucs(&mut self);
101}
102
103pub trait ConstructMucsForConnectedComponent<GH> {
104
105    fn maybe_construct_mucs_for_connected_component(
106        &mut self, 
107        component: GH
108    );
109
110    fn construct_mucs_for_connected_component(
111        &mut self,
112        component: GH
113    );
114}
115
116pub trait ConstructMucs<GH> {
117
118    fn construct_mucs(&mut self, conn_comp_vec: Vec<GH>);
119}
120
121pub trait GetNumMucs {
122
123    fn get_num_mucs(&mut self) -> usize;
124}