Skip to main content

Crate antecedent_graph

Crate antecedent_graph 

Source
Expand description

Causal graph types, dense indexes, and traversal workspaces.

Distinct concrete types (Dag, Admg, Cpdag, Pag, TemporalDag, …) preserve edge semantics — they are not interchangeable aliases.

use antecedent_core::CausalSchemaBuilder;
use antecedent_graph::Dag;

let schema = CausalSchemaBuilder::new()
    .continuous("a")
    .finish()
    .continuous("b")
    .finish()
    .build()
    .unwrap();
let dag = Dag::from_named_edges(&schema, &[("a", "b")]).unwrap();
assert_eq!(dag.node_count(), 2);

SPDX-License-Identifier: MIT OR Apache-2.0

Re-exports§

pub use admg::Admg;
pub use completion::CompletionSampler;
pub use completion::CompletionValidationReport;
pub use completion::PagCompletion;
pub use completion::is_mag_completion;
pub use completion::is_maximal_ancestral_graph;
pub use cpdag::Cpdag;
pub use cpdag::CpdagReview;
pub use cpdag::TemporalCpdag;
pub use cpdag_completion::CpdagCompletion;
pub use cpdag_completion::CpdagCompletionSampler;
pub use cpdag_completion::is_mec_member;
pub use dag::Dag;
pub use dag::DagReview;
pub use dsep::DSeparationWorkspace;
pub use dsep::PathStep;
pub use dsep::SeparationCertificate;
pub use dsep::SeparationResult;
pub use error::GraphError;
pub use overlay::DagView;
pub use overlay::GraphOverlay;
pub use pag::DefiniteStatusPath;
pub use pag::DefiniteStatusPathSearch;
pub use pag::Pag;
pub use pag::PagReview;
pub use projection::latent_project;
pub use projection::projection_preserves_msep_sample;
pub use selection::SelectionDiagram;
pub use temporal::TemporalDag;
pub use temporal_pag::TemporalPag;
pub use temporal_pag::TemporalPagReview;
pub use types::DenseNodeId;
pub use types::Endpoint;
pub use types::MarkedEdge;
pub use types::MiddleMark;
pub use unfold::LazyUnfoldedTemporalGraph;
pub use unfold::TemporalCpdagReview;
pub use unfold::TemporalGraphReview;
pub use unfold::UnfoldedTemporalGraph;
pub use unfold::ensure_lagged;
pub use workspace::BitSet;
pub use workspace::GraphWorkspace;

Modules§

admg
Acyclic directed mixed graphs (ADMGs): directed + bidirected edges.
algo
Shared graph algorithms (reachability, Kahn topo).
ancestry
Directed ancestry, descendants, and intervention mutilation.
completion
Streamed / bounded PAG completion sampling.
cpdag
Static CPDAG and temporal CPDAG.
cpdag_completion
Streamed / bounded CPDAG MEC completion sampling.
dag
Indexed DAG storage with acyclicity validation.
dsep
d-separation for DAGs.
error
Graph construction and validation errors.
marked_storage
Shared marked-adjacency helpers for CPDAG / PAG storage.
msep
m-separation for ADMGs and definite-status m-separation for PAGs.
named
Name-resolved graph construction helpers.
overlay
Intervention / mutilation overlays on an immutable Dag.
pag
Partial ancestral graphs (PAGs) with circle marks.
projection
Latent projection from DAGs onto ADMGs.
selection
Selection diagrams for structural transportability.
temporal
Temporal DAG over lagged variable nodes.
temporal_pag
Temporal PAG over lagged nodes.
types
Dense ids and edge endpoints.
unfold
Lazy finite unfolding of temporal DAGs and graph-review artifacts.
workspace
Reusable traversal workspace.

Enums§

NodeRef
Stable node identity before dense indexing.