Struct route_verification_graph::ASSetGraph
source · pub struct ASSetGraph {
pub as_num_and_sets: HashMap<ASNumOrSet, NodeIndex>,
pub graph: DiGraph<ASNumOrSet, u32>,
}
Expand description
AS Sets and AS Num membership graph. The display format can be used with Graphviz to visualize the graph. (Try print one out and paste it into Graphviz online.)
Fields§
§as_num_and_sets: HashMap<ASNumOrSet, NodeIndex>
§graph: DiGraph<ASNumOrSet, u32>
Membership graph of AS Nums and AS sets. Edge weights are 1 except for pseudo sets.
Implementations§
source§impl ASSetGraph
impl ASSetGraph
pub fn with_capacity(capacity: usize) -> Self
pub fn get_or_insert(&mut self, as_num_or_set: ASNumOrSet) -> NodeIndex
sourcepub fn add_members<I>(
&mut self,
members: I,
set: ASNumOrSet
) -> (Vec<NodeIndex>, NodeIndex)where
I: IntoIterator<Item = ASNumOrSet>,
pub fn add_members<I>(
&mut self,
members: I,
set: ASNumOrSet
) -> (Vec<NodeIndex>, NodeIndex)where
I: IntoIterator<Item = ASNumOrSet>,
Add each member in members
to set
.
pub fn count_stats(&self, set_index: NodeIndex) -> ASSetGraphStats
pub fn has_cycle(&self) -> bool
pub fn to_dot(&self) -> Dot<'_, &DiGraph<ASNumOrSet, u32>>
Trait Implementations§
source§impl Clone for ASSetGraph
impl Clone for ASSetGraph
source§fn clone(&self) -> ASSetGraph
fn clone(&self) -> ASSetGraph
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ASSetGraph
impl Debug for ASSetGraph
source§impl Default for ASSetGraph
impl Default for ASSetGraph
source§fn default() -> ASSetGraph
fn default() -> ASSetGraph
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl RefUnwindSafe for ASSetGraph
impl Send for ASSetGraph
impl Sync for ASSetGraph
impl Unpin for ASSetGraph
impl UnwindSafe for ASSetGraph
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
Mutably borrows from an owned value. Read more