pub struct FleetGraph { /* private fields */ }Expand description
Fleet topology graph. Nodes are devices, edges are communication links. Constraints propagate along edges. Holonomy (cycle consistency) verified on every cycle.
Implementations§
Source§impl FleetGraph
impl FleetGraph
pub fn new() -> Self
pub fn add_node(&mut self, node: Node)
pub fn add_edge(&mut self, edge: Edge)
Sourcepub fn find_cycles(&self) -> Vec<Vec<String>>
pub fn find_cycles(&self) -> Vec<Vec<String>>
Find all cycles using Johnson’s algorithm (simplified DFS-based approach).
Sourcepub fn find_path(&self, from: &str, to: &str) -> Option<Vec<String>>
pub fn find_path(&self, from: &str, to: &str) -> Option<Vec<String>>
Find path between two nodes (BFS)
Sourcepub fn constraint_reach(&self, constraint_id: &str) -> Vec<&Node>
pub fn constraint_reach(&self, constraint_id: &str) -> Vec<&Node>
Constraint propagation: find all devices that should know about a constraint
Sourcepub fn is_connected(&self) -> bool
pub fn is_connected(&self) -> bool
Check if graph is connected
Trait Implementations§
Source§impl Clone for FleetGraph
impl Clone for FleetGraph
Source§fn clone(&self) -> FleetGraph
fn clone(&self) -> FleetGraph
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 FleetGraph
impl Debug for FleetGraph
Source§impl Default for FleetGraph
impl Default for FleetGraph
Source§impl<'de> Deserialize<'de> for FleetGraph
impl<'de> Deserialize<'de> for FleetGraph
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for FleetGraph
impl RefUnwindSafe for FleetGraph
impl Send for FleetGraph
impl Sync for FleetGraph
impl Unpin for FleetGraph
impl UnsafeUnpin for FleetGraph
impl UnwindSafe for FleetGraph
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