rsdiff_graphs/dcg/
mod.rs

1/*
2    Appellation: dcg <module>
3    Contrib: FL03 <jo3mccain@icloud.com>
4*/
5//! # Dynamic Compute Graph
6//!
7//! A computational graph forms the backbone of automatic differentiation. Computational graphs are directed acyclic graphs (DAGs)
8//! that represent any computation as a series of nodes and edges.
9pub use self::{edge::Edge, graph::Dcg, node::Node};
10
11pub(crate) mod graph;
12
13pub mod edge;
14pub mod node;
15
16pub(crate) type DynamicGraph<T> = petgraph::graph::DiGraph<node::Node<T>, edge::Edge>;
17
18pub trait GraphData {
19    type Value: ?Sized;
20}
21
22impl<S> GraphData for S
23where
24    S: rsdiff::prelude::Scalar<Real = S>,
25{
26    type Value = S;
27}
28
29#[cfg(test)]
30mod tests {}