pub struct LambdaEdges<V> { /* private fields */ }Expand description
Identity-keyed store of per-edge Λ decoration slots for one causal graph.
Keys are (source, target) node-index pairs — the intrinsic identity of a directed edge in
the graph — so which Λ applies to which input of a join is independent of any enumeration
order. Absent key = identity Λ (see LambdaEdges::apply).
Implementations§
Source§impl<V> LambdaEdges<V>
impl<V> LambdaEdges<V>
Sourcepub fn insert(
&mut self,
source: usize,
target: usize,
lambda: EdgeLambdaFn<V>,
) -> Option<EdgeLambdaFn<V>>
pub fn insert( &mut self, source: usize, target: usize, lambda: EdgeLambdaFn<V>, ) -> Option<EdgeLambdaFn<V>>
Sets the Λ slot for the edge source -> target, returning the previously stored Λ if the
slot was already decorated.
Sourcepub fn with_lambda(
self,
source: usize,
target: usize,
lambda: EdgeLambdaFn<V>,
) -> Self
pub fn with_lambda( self, source: usize, target: usize, lambda: EdgeLambdaFn<V>, ) -> Self
Builder form of LambdaEdges::insert.
Sourcepub fn get(&self, source: usize, target: usize) -> Option<EdgeLambdaFn<V>>
pub fn get(&self, source: usize, target: usize) -> Option<EdgeLambdaFn<V>>
Looks up the Λ slot of the edge source -> target by its intrinsic identity.
None means the edge is undecorated (identity Λ).
Trait Implementations§
Source§impl<V> Clone for LambdaEdges<V>
impl<V> Clone for LambdaEdges<V>
Source§impl<V> Debug for LambdaEdges<V>
impl<V> Debug for LambdaEdges<V>
Auto Trait Implementations§
impl<V> Freeze for LambdaEdges<V>
impl<V> RefUnwindSafe for LambdaEdges<V>
impl<V> Send for LambdaEdges<V>
impl<V> Sync for LambdaEdges<V>
impl<V> Unpin for LambdaEdges<V>
impl<V> UnsafeUnpin for LambdaEdges<V>
impl<V> UnwindSafe for LambdaEdges<V>
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