pub struct CausalGraph {
pub graph: DiGraph<CausalNode, CausalEdge>,
pub node_index_map: HashMap<String, NodeIndex>,
}Fields§
§graph: DiGraph<CausalNode, CausalEdge>§node_index_map: HashMap<String, NodeIndex>Implementations§
Source§impl CausalGraph
impl CausalGraph
pub fn new() -> Self
pub fn ensure_cause_node(&mut self, signature: &EditOpSignature) -> NodeIndex
pub fn ensure_effect_node(&mut self, signature: &EffectSignature) -> NodeIndex
pub fn update_edge( &mut self, cause_index: NodeIndex, effect_index: NodeIndex, score: f64, )
pub fn ingest_run( &mut self, run: &AttributedRunResult, config: &AttributionConfig, ) -> Result<(), CeaCoreError>
pub fn outgoing_edges( &self, node_index: NodeIndex, ) -> Vec<(NodeIndex, &CausalEdge)>
pub fn apply_decay(&mut self, factor: f64)
pub fn coverage_summary(&self) -> CoverageSummary
pub fn save<P: AsRef<Path>>(&self, path: P) -> Result<(), CeaCoreError>
pub fn load<P: AsRef<Path>>(path: P) -> Result<Self, CeaCoreError>
Trait Implementations§
Source§impl Debug for CausalGraph
impl Debug for CausalGraph
Auto Trait Implementations§
impl Freeze for CausalGraph
impl RefUnwindSafe for CausalGraph
impl Send for CausalGraph
impl Sync for CausalGraph
impl Unpin for CausalGraph
impl UnsafeUnpin for CausalGraph
impl UnwindSafe for CausalGraph
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