pub struct Graph<GH> { /* private fields */ }Expand description
| Simple undirected unweighted graph | data structure no checks whatsoever | should call init_size(..) first then | insert_edge(..) to populate | | IMP: nodes have indexes from 0 to n-1 | | IMP: graph is assumed to be connected |
Implementations§
Source§impl<GH> Graph<GH>where
GH: BccGraphHashInterface,
impl<GH> Graph<GH>where
GH: BccGraphHashInterface,
pub fn nodeid_range(&self) -> Vec<NodeId>
pub fn limited_nodeid_range(&self, cap: Option<usize>) -> Vec<NodeId>
pub fn mapped_nodes(&self) -> Vec<NodeId>
pub fn set_neighbors(&mut self, node: NodeId, nbrs: Vec<NodeId>)
pub fn add_neighbor(&mut self, node: NodeId, nbr: NodeId)
pub fn has_map_for_node(&self, node: NodeId) -> bool
pub fn remove_node_and_neighbors(&mut self, node: NodeId)
pub fn neighbors(&self, node: NodeId) -> Neighbors
pub fn extend_mapped_nodes(&mut self, other: &NeighborsMap)
pub fn nodes_map_unlink_all(&mut self, src: NodeId, dst: NodeId)
pub fn nodes_map_add_edge(&mut self, e: &Edge)
pub fn nodes_map_unlink_edge(&mut self, e: &Edge)
pub fn nodes_map_reinit(&mut self, len: usize)
pub fn nodes_map_clear(&mut self)
pub fn nodes_map_add_isolated_node(&mut self, node: NodeId)
pub fn num_edges(&self) -> usize
pub fn clear_edges(&mut self)
pub fn has_edge(&self, edge: &Edge) -> bool
pub fn connects(&self, src: NodeId, dst: NodeId) -> bool
pub fn unlink_all_edges_between(&mut self, src: NodeId, dst: NodeId)
pub fn edges_to_node(&self, src: NodeId) -> Vec<Edge>
pub fn edges_from_node(&self, src: NodeId) -> Vec<Edge>
pub fn debug_all(&self) -> bool
pub fn adjacency_list_for_dachshund(&self) -> Vec<(usize, usize)>
Source§impl<GH> Graph<GH>
impl<GH> Graph<GH>
pub fn node_to_muc_debugger<'g>( &'g self, ) -> NodeToMinimumUnionCycleDebugger<'g, Self>
Trait Implementations§
Source§impl<GH> ApproxBrandesIterationRuntimeOnBccSubgraph for Graph<GH>
impl<GH> ApproxBrandesIterationRuntimeOnBccSubgraph for Graph<GH>
Source§fn approx_bcc_iter_tm(
&mut self,
src: NodeId,
dst: NodeId,
avg_iter_time: &mut Duration,
num_iter: Option<usize>,
) -> Result<(), BetweennessCentralityError>
fn approx_bcc_iter_tm( &mut self, src: NodeId, dst: NodeId, avg_iter_time: &mut Duration, num_iter: Option<usize>, ) -> Result<(), BetweennessCentralityError>
| approximates the runtime of Brandes | iteration on a bcc subgraph by doing | @num_iter iteration and taking the average | if @num_iter is -1 the number of iteration | is just going to be the number of nodes in | the graph |
Source§impl<GH> BuildGraphHashMappingForConnVertex<GH> for Graph<GH>
impl<GH> BuildGraphHashMappingForConnVertex<GH> for Graph<GH>
fn build_graphhash_mapping_for_conn_vertex_step( &self, gh: &mut GH, bfs_source: NodeId, conn_vert: NodeId, item: (NodeId, &Vec<NodeId>), muc_id: MinimumUnionCycleId, ) -> Result<(), BetweennessCentralityError>
fn build_graphhash_mapping_for_conn_vertex( &self, item: (NodeId, &Vec<NodeId>), muc_id: MinimumUnionCycleId, ) -> Result<(NodeId, Arc<GH>), BetweennessCentralityError>
Source§impl<GH> ClearMucs for Graph<GH>where
GH: IsValid + ExtendWith<GH> + GetConnectedComponentSizes + GetEdges + GetNeighborsForNode + GetNodeIdRange + HasMapForNode + InsertEdge + InsertNode + MappedNodes + NumEdges + NumNodes,
impl<GH> ClearMucs for Graph<GH>where
GH: IsValid + ExtendWith<GH> + GetConnectedComponentSizes + GetEdges + GetNeighborsForNode + GetNodeIdRange + HasMapForNode + InsertEdge + InsertNode + MappedNodes + NumEdges + NumNodes,
fn clear_mucs(&mut self) -> Result<(), BetweennessCentralityError>
Source§impl<GH> CollectAllMucEdges for Graph<GH>where
GH: GetConnectedComponentSizes + ExtendWith<GH> + GetEdges + GetNeighborsForNode + GetNodeIdRange + HasMapForNode + InsertEdge + InsertNode + MappedNodes + NumEdges + NumNodes,
impl<GH> CollectAllMucEdges for Graph<GH>where
GH: GetConnectedComponentSizes + ExtendWith<GH> + GetEdges + GetNeighborsForNode + GetNodeIdRange + HasMapForNode + InsertEdge + InsertNode + MappedNodes + NumEdges + NumNodes,
fn collect_all_edges_in_mucs_in_one_set( &mut self, ) -> Result<Edges, BetweennessCentralityError>
Source§impl<GH> ConnectNodeIds for Graph<GH>
impl<GH> ConnectNodeIds for Graph<GH>
fn connect_nodeids( &mut self, src: NodeId, dst: NodeId, ) -> Result<(), BetweennessCentralityError>
Source§impl<GH> ConnectedComponentSize for Graph<GH>
impl<GH> ConnectedComponentSize for Graph<GH>
Source§fn connected_component_size_through_v_and_this_edge(
&self,
visit_markers: &mut VisitMarkers,
u: NodeId,
) -> usize
fn connected_component_size_through_v_and_this_edge( &self, visit_markers: &mut VisitMarkers, u: NodeId, ) -> usize
do a dfs from this guy to figure out the size of the connected component connected to the bcc through v and this edge
Source§impl<GH> ConstructMucs<GH> for Graph<GH>where
GH: GetEdges + InsertEdge + NumEdges + GetConnectedComponentSizes + InsertNode + GetNeighborsForNode + GetNodeIdRange + HasMapForNode + MappedNodes + NumNodes + ExtendWith<GH>,
impl<GH> ConstructMucs<GH> for Graph<GH>where
GH: GetEdges + InsertEdge + NumEdges + GetConnectedComponentSizes + InsertNode + GetNeighborsForNode + GetNodeIdRange + HasMapForNode + MappedNodes + NumNodes + ExtendWith<GH>,
fn construct_mucs(&mut self, conn_comp_vec: Vec<GH>)
Source§impl<GH> ConstructMucsForConnectedComponent<GH> for Graph<GH>where
GH: NumNodes + ExtendWith<GH> + GetConnectedComponentSizes + GetEdges + GetNeighborsForNode + GetNodeIdRange + HasMapForNode + InsertEdge + InsertNode + MappedNodes + NumEdges,
impl<GH> ConstructMucsForConnectedComponent<GH> for Graph<GH>where
GH: NumNodes + ExtendWith<GH> + GetConnectedComponentSizes + GetEdges + GetNeighborsForNode + GetNodeIdRange + HasMapForNode + InsertEdge + InsertNode + MappedNodes + NumEdges,
fn maybe_construct_mucs_for_connected_component(&mut self, component: GH)
fn construct_mucs_for_connected_component(&mut self, component: GH)
Source§impl<GH> ConstructSingleNodeMucs for Graph<GH>where
GH: GetConnectedComponentSizes + ExtendWith<GH> + GetEdges + GetNeighborsForNode + GetNodeIdRange + HasMapForNode + InsertEdge + InsertNode + MappedNodes + NumEdges + NumNodes,
impl<GH> ConstructSingleNodeMucs for Graph<GH>where
GH: GetConnectedComponentSizes + ExtendWith<GH> + GetEdges + GetNeighborsForNode + GetNodeIdRange + HasMapForNode + InsertEdge + InsertNode + MappedNodes + NumEdges + NumNodes,
fn maybe_construct_single_node_muc(&mut self, idx: NodeId)
fn construct_single_node_mucs(&mut self)
Source§impl<GH> CreateAndPushNewMuc for Graph<GH>where
GH: ExtendWith<GH, Error = BetweennessCentralityError> + GetConnectedComponentSizes + GetEdges + GetNeighborsForNode + GetNodeIdRange + HasMapForNode + InsertEdge + InsertNode + MappedNodes + NumEdges + NumNodes,
impl<GH> CreateAndPushNewMuc for Graph<GH>where
GH: ExtendWith<GH, Error = BetweennessCentralityError> + GetConnectedComponentSizes + GetEdges + GetNeighborsForNode + GetNodeIdRange + HasMapForNode + InsertEdge + InsertNode + MappedNodes + NumEdges + NumNodes,
type Error = BetweennessCentralityError
fn create_and_push_new_muc( &mut self, shortest_path: &Vec<NodeId>, edge: &Edge, src_muc_id: MinimumUnionCycleId, dst_muc_id: MinimumUnionCycleId, ) -> Result<MinimumUnionCycleId, Self::Error>
Source§impl<GH> CreateRandomConnected for Graph<GH>
impl<GH> CreateRandomConnected for Graph<GH>
Source§fn random_connected(n_vertices: usize, n_edges: usize) -> Self
fn random_connected(n_vertices: usize, n_edges: usize) -> Self
TODO: This is probably inefficient, but maybe not that bad
Source§impl<GH> CreateScoresVector for Graph<GH>
impl<GH> CreateScoresVector for Graph<GH>
fn create_scores_vector(&self) -> BetweennessScores
Source§impl<GH> CreateSingleVertexMucs for Graph<GH>where
GH: GetConnectedComponentSizes + ExtendWith<GH> + GetEdges + GetNeighborsForNode + GetNodeIdRange + HasMapForNode + InsertEdge + InsertNode + MappedNodes + NumEdges + NumNodes,
impl<GH> CreateSingleVertexMucs for Graph<GH>where
GH: GetConnectedComponentSizes + ExtendWith<GH> + GetEdges + GetNeighborsForNode + GetNodeIdRange + HasMapForNode + InsertEdge + InsertNode + MappedNodes + NumEdges + NumNodes,
fn create_single_vertex_muc(&mut self, idx: NodeId)
fn maybe_create_single_vertex_muc(&mut self, idx: NodeId)
fn create_single_vertex_mucs(&mut self)
Source§impl<GH> Debug for Graph<GH>where
GH: BccGraphHashInterface,
impl<GH> Debug for Graph<GH>where
GH: BccGraphHashInterface,
Source§impl<GH> FindAllMucSubgraphs for Graph<GH>where
GH: GetEdges + ClearMucs + CreateNamedEmpty + Debug + ExtendWith<GH, Error = BetweennessCentralityError> + FindConnectedComponents<GH, Error = BetweennessCentralityError> + GetConnectedComponentSizes + GetNeighborsForNode + GetNodeIdRange + HasMapForNode + InsertEdge + InsertNode + IsValid + MappedNodes + NewFromCycleVec + NewFromGraphRef<Self> + NumEdges + NumNodes + RemoveBridges,
impl<GH> FindAllMucSubgraphs for Graph<GH>where
GH: GetEdges + ClearMucs + CreateNamedEmpty + Debug + ExtendWith<GH, Error = BetweennessCentralityError> + FindConnectedComponents<GH, Error = BetweennessCentralityError> + GetConnectedComponentSizes + GetNeighborsForNode + GetNodeIdRange + HasMapForNode + InsertEdge + InsertNode + IsValid + MappedNodes + NewFromCycleVec + NewFromGraphRef<Self> + NumEdges + NumNodes + RemoveBridges,
Source§fn find_all_muc_subgraphs(&mut self)
fn find_all_muc_subgraphs(&mut self)
find the disconnected subgraphs that will result from the deletion of connection vertices
Source§impl<GH> FindConnVerts for Graph<GH>where
GH: GetEdges + ClearMucs + ExtendWith<GH> + GetConnectedComponentSizes + GetNeighborsForNode + GetNodeIdRange + HasMapForNode + InsertEdge + InsertNode + IsValid + MappedNodes + NumEdges + NumNodes,
impl<GH> FindConnVerts for Graph<GH>where
GH: GetEdges + ClearMucs + ExtendWith<GH> + GetConnectedComponentSizes + GetNeighborsForNode + GetNodeIdRange + HasMapForNode + InsertEdge + InsertNode + IsValid + MappedNodes + NumEdges + NumNodes,
Source§fn find_conn_verts(&mut self) -> Result<(), BetweennessCentralityError>
fn find_conn_verts(&mut self) -> Result<(), BetweennessCentralityError>
find the connection vertices for each muc
edges that belong to the graph and don’t belong to any muc connect two connection vertices
-
collect all edges in mucs in one set
-
do simple subtraction of edges and update muc’s
Source§impl<GH> FindEdgeBccWithComponent<GH> for Graph<GH>where
GH: HasEdge + ConnectedComponentSize + RemoveEdge + CreateNamedEmpty + MappedNodes + NumNodes + Named + GetNeighborsForNode + GetNodeIdRange + GetEdges + BccGraphHashInterface,
impl<GH> FindEdgeBccWithComponent<GH> for Graph<GH>where
GH: HasEdge + ConnectedComponentSize + RemoveEdge + CreateNamedEmpty + MappedNodes + NumNodes + Named + GetNeighborsForNode + GetNodeIdRange + GetEdges + BccGraphHashInterface,
Source§fn find_edge_bcc_with_component_step(
&mut self,
gh: &GH,
v: NodeId,
component: &mut Component,
e: &Edge,
) -> Result<(), BetweennessCentralityError>
fn find_edge_bcc_with_component_step( &mut self, gh: &GH, v: NodeId, component: &mut Component, e: &Edge, ) -> Result<(), BetweennessCentralityError>
the node is an articulation point and it belongs to the bcc of interest, so it must be added to the art point of this bcc along with the sizes of the subgraphs it connects the bcc to
Source§fn find_edge_bcc_with_component(
&mut self,
component: &mut Component,
e: &Edge,
) -> Result<(), BetweennessCentralityError>
fn find_edge_bcc_with_component( &mut self, component: &mut Component, e: &Edge, ) -> Result<(), BetweennessCentralityError>
a. find the bcc subgraph
b. find the articulation points in bcc
c. find the sizes of the subgraphs connected to each art point
IMP: assumes @e is not in the graph already
Source§impl<GH> FindEdgeBccWithDelta<GH> for Graph<GH>where
GH: ResetWith<GH> + RemoveEdge + FindSingleSourceShortestPaths + MappedNodes + NumNodes + GetNodeIdRange + GetNeighborsForNode + ParentsForNode + InitDebugIteration + DebugIterationStep + NumEdges + FindPruningCounts + HasEdge + GetEdges + InsertEdge + PathCountForNode + PairDependencyForNode + SetPairDependencyForNode + SetSigmaValueForNode + GetSigmaValueForNode + BccGraphHashInterface,
impl<GH> FindEdgeBccWithDelta<GH> for Graph<GH>where
GH: ResetWith<GH> + RemoveEdge + FindSingleSourceShortestPaths + MappedNodes + NumNodes + GetNodeIdRange + GetNeighborsForNode + ParentsForNode + InitDebugIteration + DebugIterationStep + NumEdges + FindPruningCounts + HasEdge + GetEdges + InsertEdge + PathCountForNode + PairDependencyForNode + SetPairDependencyForNode + SetSigmaValueForNode + GetSigmaValueForNode + BccGraphHashInterface,
Source§fn find_edge_bcc_with_delta(
&mut self,
bcc: &mut BiconnectedComponentsDelta<GH>,
edge: &Edge,
) -> Result<(), BetweennessCentralityError>
fn find_edge_bcc_with_delta( &mut self, bcc: &mut BiconnectedComponentsDelta<GH>, edge: &Edge, ) -> Result<(), BetweennessCentralityError>
a. find the bcc subgraph
b. find the articulation points in bcc
c. find the sizes of the subgraphs connected to each art point
Source§fn find_edge_bcc_with_delta_step(
&mut self,
v: NodeId,
bcc: &mut BiconnectedComponentsDelta<GH>,
edge: &Edge,
) -> Result<(), BetweennessCentralityError>
fn find_edge_bcc_with_delta_step( &mut self, v: NodeId, bcc: &mut BiconnectedComponentsDelta<GH>, edge: &Edge, ) -> Result<(), BetweennessCentralityError>
the node is an articulation point and it belongs to the bcc of interest, so it must be added to the art point of this bcc along with the sizes of the subgraphs it connects the bcc to
Source§impl<GH> FindEdgeBccWithScratch<GH> for Graph<GH>where
GH: DebugIterationStep + FindPruningCounts + GetEdges + GetNeighborsForNode + GetNodeIdRange + GetSigmaValueForNode + HasEdge + InitDebugIteration + InsertEdge + MappedNodes + NumEdges + NumNodes + PairDependencyForNode + ParentsForNode + RemoveEdge + BccGraphHashInterface,
impl<GH> FindEdgeBccWithScratch<GH> for Graph<GH>where
GH: DebugIterationStep + FindPruningCounts + GetEdges + GetNeighborsForNode + GetNodeIdRange + GetSigmaValueForNode + HasEdge + InitDebugIteration + InsertEdge + MappedNodes + NumEdges + NumNodes + PairDependencyForNode + ParentsForNode + RemoveEdge + BccGraphHashInterface,
Source§fn find_edge_bcc_with_scratch(
&mut self,
bcc: &mut BiconnectedComponentsScratch<GH>,
edge: &Edge,
) -> Result<(), BetweennessCentralityError>
fn find_edge_bcc_with_scratch( &mut self, bcc: &mut BiconnectedComponentsScratch<GH>, edge: &Edge, ) -> Result<(), BetweennessCentralityError>
a. find the bcc subgraph
b. find the articulation points in bcc
c. find the sizes of the subgraphs connected to each art point
Source§fn find_edge_bcc_with_scratch_step(
&mut self,
v: NodeId,
bcc: &mut BiconnectedComponentsScratch<GH>,
edge: &Edge,
) -> Result<(), BetweennessCentralityError>
fn find_edge_bcc_with_scratch_step( &mut self, v: NodeId, bcc: &mut BiconnectedComponentsScratch<GH>, edge: &Edge, ) -> Result<(), BetweennessCentralityError>
the node is an articulation point and it belongs to the bcc of interest, so it must be added to the art point of this bcc along with the sizes of the subgraphs it connects the bcc to
Source§impl<GH> FindMucMcb<GH> for Graph<GH>where
GH: GetEdges + ClearMucs + CreateNamedEmpty + Debug + ExtendWith<GH, Error = BetweennessCentralityError> + FindConnectedComponents<GH, Error = BetweennessCentralityError> + GetConnectedComponentSizes + GetNeighborsForNode + GetNodeIdRange + HasMapForNode + InsertEdge + InsertNode + IsValid + MappedNodes + NewFromCycleVec + NewFromGraphRef<Self> + NumEdges + NumNodes + RemoveBridges,
impl<GH> FindMucMcb<GH> for Graph<GH>where
GH: GetEdges + ClearMucs + CreateNamedEmpty + Debug + ExtendWith<GH, Error = BetweennessCentralityError> + FindConnectedComponents<GH, Error = BetweennessCentralityError> + GetConnectedComponentSizes + GetNeighborsForNode + GetNodeIdRange + HasMapForNode + InsertEdge + InsertNode + IsValid + MappedNodes + NewFromCycleVec + NewFromGraphRef<Self> + NumEdges + NumNodes + RemoveBridges,
fn find_muc_mcb(&mut self) -> Result<(), BetweennessCentralityError>
fn find_muc_mcb_for_cycle( &mut self, src: NodeId, cycle_graph: &GH, visit_markers: &mut VisitMarkers, ) -> Result<(), BetweennessCentralityError>
Source§impl<GH> FindMucSubgraphs for Graph<GH>where
GH: GetConnectedComponentSizes + ClearMucs + CreateNamedEmpty + ExtendWith<GH, Error = BetweennessCentralityError> + GetEdges + GetNeighborsForNode + GetNodeIdRange + GraphHashMucInterface + HasMapForNode + InsertEdge + InsertNode + IsValid + MappedNodes + NumEdges + NumNodes,
impl<GH> FindMucSubgraphs for Graph<GH>where
GH: GetConnectedComponentSizes + ClearMucs + CreateNamedEmpty + ExtendWith<GH, Error = BetweennessCentralityError> + GetEdges + GetNeighborsForNode + GetNodeIdRange + GraphHashMucInterface + HasMapForNode + InsertEdge + InsertNode + IsValid + MappedNodes + NumEdges + NumNodes,
Source§fn find_muc_subgraphs(
&mut self,
muc_id: MinimumUnionCycleId,
) -> Result<(), BetweennessCentralityError>
fn find_muc_subgraphs( &mut self, muc_id: MinimumUnionCycleId, ) -> Result<(), BetweennessCentralityError>
| TODO not sure what to do with single node | muc’s, will not do anything for them | now |
Source§impl<GH> FindMucs for Graph<GH>where
GH: GetEdges + ClearMucs + CreateNamedEmpty + Debug + BccGraphHashInterface + ExtendWith<GH, Error = BetweennessCentralityError> + FindConnectedComponents<GH, Error = BetweennessCentralityError> + GetConnectedComponentSizes + GetNeighborsForNode + GetNodeIdRange + HasMapForNode + InsertEdge + InsertNode + IsValid + MappedNodes + NewFromCycleVec + NewFromGraphRef<Self> + NumEdges + NumNodes + RemoveBridges,
impl<GH> FindMucs for Graph<GH>where
GH: GetEdges + ClearMucs + CreateNamedEmpty + Debug + BccGraphHashInterface + ExtendWith<GH, Error = BetweennessCentralityError> + FindConnectedComponents<GH, Error = BetweennessCentralityError> + GetConnectedComponentSizes + GetNeighborsForNode + GetNodeIdRange + HasMapForNode + InsertEdge + InsertNode + IsValid + MappedNodes + NewFromCycleVec + NewFromGraphRef<Self> + NumEdges + NumNodes + RemoveBridges,
Source§fn find_mucs_fast(&mut self) -> Result<(), BetweennessCentralityError>
fn find_mucs_fast(&mut self) -> Result<(), BetweennessCentralityError>
-
find bridges
-
delete bridges
-
find connected components of size >=3 (these are MinimumUnionCycles)
fn find_mucs(&mut self)
Source§impl<GH> FindSingleSourceShortestPaths for Graph<GH>
impl<GH> FindSingleSourceShortestPaths for Graph<GH>
fn find_single_source_shortest_paths( &self, s: NodeId, ) -> Result<DistanceMap, BetweennessCentralityError>
Source§impl<GH> FromFilename for Graph<GH>where
GH: BccGraphHashInterface,
impl<GH> FromFilename for Graph<GH>where
GH: BccGraphHashInterface,
fn from_filename(filename: &str) -> Self
Source§impl<GH> GetEdgeListDebugger for Graph<GH>
impl<GH> GetEdgeListDebugger for Graph<GH>
fn edgelist_debugger<'g>(&'g self) -> EdgeListDebugger<'g, Self>
Source§impl<GH> GetMuc<GH> for Graph<GH>
impl<GH> GetMuc<GH> for Graph<GH>
fn muc(&self, idx: MinimumUnionCycleId) -> &MinimumUnionCycle<GH>
fn muc_mut(&mut self, idx: MinimumUnionCycleId) -> &mut MinimumUnionCycle<GH>
Source§impl<GH> GetMucDebuggerWithNodes for Graph<GH>
impl<GH> GetMucDebuggerWithNodes for Graph<GH>
fn muc_debugger_with_nodes<'g>(&'g self) -> MinimumUnionCycleDebugger<'g, Self>
Source§impl<GH> GetMucDebuggerWithoutNodes for Graph<GH>
impl<GH> GetMucDebuggerWithoutNodes for Graph<GH>
fn muc_debugger_without_nodes<'g>( &'g self, ) -> MinimumUnionCycleDebugger<'g, Self>
Source§impl<GH> GetMucs<GH> for Graph<GH>
impl<GH> GetMucs<GH> for Graph<GH>
fn get_mucs<'a>(&'a self) -> &Vec<MinimumUnionCycle<GH>>
Source§impl<GH> GetNeighborsForNode for Graph<GH>
impl<GH> GetNeighborsForNode for Graph<GH>
Source§impl<GH> GetNodesToMucs for Graph<GH>
impl<GH> GetNodesToMucs for Graph<GH>
fn get_nodes_to_mucs<'a>(&'a self) -> &'a MucIdMap
Source§impl<GH> GetNumMucs for Graph<GH>
impl<GH> GetNumMucs for Graph<GH>
fn get_num_mucs(&mut self) -> usize
Source§impl<GH> GetShortestPath for Graph<GH>
impl<GH> GetShortestPath for Graph<GH>
fn get_shortest_path( &mut self, src: NodeId, dst: NodeId, ) -> Result<Vec<NodeId>, BetweennessCentralityError>
Source§impl<GH> InitBetweennessCentrality for Graph<GH>where
GH: GetLimitedNodeIdRange,
Self: GetLimitedNodeIdRange,
impl<GH> InitBetweennessCentrality for Graph<GH>where
GH: GetLimitedNodeIdRange,
Self: GetLimitedNodeIdRange,
Source§impl<GH> InitInternals for Graph<GH>
impl<GH> InitInternals for Graph<GH>
type Error = BetweennessCentralityError
fn init_internals(&mut self) -> Result<(), Self::Error>
Source§impl<GH> InsertEdge for Graph<GH>
impl<GH> InsertEdge for Graph<GH>
fn insert_edge(&mut self, edge: &Edge) -> Result<(), BetweennessCentralityError>
Source§impl<GH> InsertEdgeUpdateBc for Graph<GH>where
GH: GraphHashMucInterface + ResetWith<GH> + RemoveEdge + CreateNamedEmpty + FindSingleSourceShortestPaths + GetNodeIdRange + GetNeighborsForNode + ParentsForNode + InitDebugIteration + DebugIterationStep + FindPruningCounts + HasEdge + PathCountForNode + PairDependencyForNode + SetPairDependencyForNode + SetSigmaValueForNode + GetSigmaValueForNode + BccGraphHashInterface,
impl<GH> InsertEdgeUpdateBc for Graph<GH>where
GH: GraphHashMucInterface + ResetWith<GH> + RemoveEdge + CreateNamedEmpty + FindSingleSourceShortestPaths + GetNodeIdRange + GetNeighborsForNode + ParentsForNode + InitDebugIteration + DebugIterationStep + FindPruningCounts + HasEdge + PathCountForNode + PairDependencyForNode + SetPairDependencyForNode + SetSigmaValueForNode + GetSigmaValueForNode + BccGraphHashInterface,
fn insert_edge_update_bc_experimental( &mut self, edge: &Edge, bcc_stat: &mut BiconnectedComponentsStat, max_iter_d1: Option<usize>, max_iter_d2: Option<usize>, ) -> Result<(), BetweennessCentralityError>
Source§impl<GH> InsertEdgeUpdateMuc for Graph<GH>where
GH: GraphHashMucInterface + ClearMucs + CreateNamedEmpty + ExtendWith<GH, Error = BetweennessCentralityError> + GetConnectedComponentSizes + GetNeighborsForNode + GetNodeIdRange + IsValid,
impl<GH> InsertEdgeUpdateMuc for Graph<GH>where
GH: GraphHashMucInterface + ClearMucs + CreateNamedEmpty + ExtendWith<GH, Error = BetweennessCentralityError> + GetConnectedComponentSizes + GetNeighborsForNode + GetNodeIdRange + IsValid,
Source§fn insert_edge_and_update_muc_when_full_edge_contained_in_muc(
&mut self,
edge: &Edge,
src_muc_id: MinimumUnionCycleId,
)
fn insert_edge_and_update_muc_when_full_edge_contained_in_muc( &mut self, edge: &Edge, src_muc_id: MinimumUnionCycleId, )
case 1: both @src and @dst are in the same muc
then just update the graph and the
muc graphjust update the muc and the graph
Source§fn insert_edge_and_update_muc_when_we_are_not_in_the_same_muc(
&mut self,
edge: &Edge,
src_muc_id: MinimumUnionCycleId,
dst_muc_id: MinimumUnionCycleId,
) -> Result<(), BetweennessCentralityError>
fn insert_edge_and_update_muc_when_we_are_not_in_the_same_muc( &mut self, edge: &Edge, src_muc_id: MinimumUnionCycleId, dst_muc_id: MinimumUnionCycleId, ) -> Result<(), BetweennessCentralityError>
case 2: @src and @dst are not in the same muc
fn insert_edge_update_muc(&mut self, edge: &Edge)
Source§impl<GH> MergeMucCycle<GH> for Graph<GH>where
GH: GetConnectedComponentSizes + ExtendWith<GH> + GetEdges + GetNeighborsForNode + GetNodeIdRange + HasMapForNode + InsertEdge + InsertNode + MappedNodes + NumEdges + NumNodes,
impl<GH> MergeMucCycle<GH> for Graph<GH>where
GH: GetConnectedComponentSizes + ExtendWith<GH> + GetEdges + GetNeighborsForNode + GetNodeIdRange + HasMapForNode + InsertEdge + InsertNode + MappedNodes + NumEdges + NumNodes,
Source§fn merge_muc_cycle(&mut self, muc: &mut MinimumUnionCycle<GH>, cycle: &Cycle)
fn merge_muc_cycle(&mut self, muc: &mut MinimumUnionCycle<GH>, cycle: &Cycle)
| add all the edges in cycle to muc |
Source§impl<GH> NodeIdToMucId for Graph<GH>
impl<GH> NodeIdToMucId for Graph<GH>
fn nodeid_to_mucid(&self, idx: NodeId) -> MinimumUnionCycleId
Source§impl<GH> PrintHeader for Graph<GH>
impl<GH> PrintHeader for Graph<GH>
fn print_header(&self)
Source§impl<GH> ReadGraph for Graph<GH>where
GH: BccGraphHashInterface,
impl<GH> ReadGraph for Graph<GH>where
GH: BccGraphHashInterface,
Source§impl<GH> RemoveEdge for Graph<GH>
impl<GH> RemoveEdge for Graph<GH>
fn remove_edge(&mut self, edge: &Edge) -> Result<(), BetweennessCentralityError>
Source§impl<GH> ResetVisitMarkersAndVisitNode for Graph<GH>
impl<GH> ResetVisitMarkersAndVisitNode for Graph<GH>
fn reset_visit_markers_and_visit_node(&mut self, node: NodeId)
Source§impl<GH> SetGraphName for Graph<GH>
impl<GH> SetGraphName for Graph<GH>
fn set_graph_name(&mut self, name: &str)
Source§impl<GH> SetMucDebug for Graph<GH>where
GH: GraphHashMucInterface,
impl<GH> SetMucDebug for Graph<GH>where
GH: GraphHashMucInterface,
fn set_muc_debug(&self, val: bool)
Source§impl<GH> SubtractEdge for Graph<GH>where
GH: GetConnectedComponentSizes + ExtendWith<GH> + GetEdges + GetNeighborsForNode + GetNodeIdRange + HasMapForNode + InsertEdge + InsertNode + MappedNodes + NumEdges + NumNodes,
impl<GH> SubtractEdge for Graph<GH>where
GH: GetConnectedComponentSizes + ExtendWith<GH> + GetEdges + GetNeighborsForNode + GetNodeIdRange + HasMapForNode + InsertEdge + InsertNode + MappedNodes + NumEdges + NumNodes,
fn simple_subtract_edge_and_update_mucs(&mut self, edge: &Edge)
fn maybe_simple_subtract_edge_and_update_mucs( &mut self, edge: &Edge, all_muc_edges: &Edges, )
fn do_simple_subtraction_of_edges_and_update_mucs( &mut self, all_muc_edges: &Edges, )
Source§impl<GH> VisitMarkersHandle for Graph<GH>
impl<GH> VisitMarkersHandle for Graph<GH>
fn visit_markers_handle(&mut self) -> &mut VisitMarkers
Auto Trait Implementations§
impl<GH> Freeze for Graph<GH>
impl<GH> RefUnwindSafe for Graph<GH>where
GH: RefUnwindSafe,
impl<GH> Send for Graph<GH>
impl<GH> Sync for Graph<GH>
impl<GH> Unpin for Graph<GH>where
GH: Unpin,
impl<GH> UnwindSafe for Graph<GH>where
GH: UnwindSafe + RefUnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<G> FindArticulationPoints for G
impl<G> FindArticulationPoints for G
Source§fn find_articulation_points(&self, out_vec: &mut Vec<NodeId>)
fn find_articulation_points(&self, out_vec: &mut Vec<NodeId>)
| This function will return a vector of | the articulation points. | | If an articulation point appears in | more than two biconnected components | it will appear more than once (number | of bcc’s it appears in -1) |
fn articulation_point_dfs_visitor<'a>( &self, u: NodeId, ctx: &mut ArticulationPointFinderContext<'a>, articulation_point_vec: &mut Vec<NodeId>, ) -> Result<(), BetweennessCentralityError>
fn articulation_point_dfs_visitor_step_tree_edge<'a>( &self, v: NodeId, u: NodeId, ctx: &mut ArticulationPointFinderContext<'a>, articulation_point_vec: &mut Vec<NodeId>, tree_edge_cnt: &mut i32, ) -> Result<(), BetweennessCentralityError>
Source§impl<T> FindBiconnectedComponent for T
impl<T> FindBiconnectedComponent for T
fn find_bicon_component<GH>(&mut self, out_vec: &mut Vec<GH>)where
GH: BccGraphHashInterface,
Source§impl<G> FindBridgeEdges for Gwhere
G: FindBiconnectedComponent,
impl<G> FindBridgeEdges for Gwhere
G: FindBiconnectedComponent,
Source§fn find_bridge_edges<GH>(&mut self) -> Vec<Edge>where
GH: BccGraphHashInterface,
fn find_bridge_edges<GH>(&mut self) -> Vec<Edge>where
GH: BccGraphHashInterface,
the single edge in a size 2 bcc is a bridge
Source§impl<T> FindEdgeBccSubgraph for T
impl<T> FindEdgeBccSubgraph for T
Source§fn find_edge_bcc_subgraph<GH>(
&mut self,
bcc: &mut GH,
edge: &Edge,
) -> Result<(), BetweennessCentralityError>where
GH: BccGraphHashInterface,
fn find_edge_bcc_subgraph<GH>(
&mut self,
bcc: &mut GH,
edge: &Edge,
) -> Result<(), BetweennessCentralityError>where
GH: BccGraphHashInterface,
| the edge (@src, @dst) must be in the graph | the biconnected component subgraph that | contains the passed edge will be returned | in @bcc | | IMP assumption: | | the input graph is connected, and the edge | (src, dst) is inserted, so the edge (src, | dst) is part of a cycle, so both ends | belong to the same bcc | |IMP: (src,dst) must exist!
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PoisonMessage for Twhere
T: Debug,
impl<T> PoisonMessage for Twhere
T: Debug,
fn poison_message(&self) -> String
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.