DeepCausality Effects
DeepCausality Effects provides a unified type system for building heterogeneous causal graphs. It introduces the EffectData enum, which acts as a versatile container for various data types, enabling the core deep_causality engine to reason across diverse domains within a single graph structure.
Overview
In complex systems, causal effects often appear in different forms: simple boolean triggers, continuous scalar values, multi-dimensional tensors, or geometric algebra constructs. deep_causality_effects solves the challenge of strictly typed homogeneous graphs by providing a "Sum Type" wrapper that encapsulates this complexity.
The crate is designed around the "Atomic + Escape Hatch" pattern:
- Atomic Variants: Efficient handling of common primitives (
bool,f64,i64). - Unified Numerics: A
NumericValuetype covering the full range of Rust's integer and float types. - Algebraic & Topological Types: Native support for
MultiVector,CausalTensor,PointCloud,SimplicialComplex, andManifold. - Escape Hatch: A type-erased
Customvariant (Arc<dyn Any>) for arbitrary complex structures.
Features
- Heterogeneity: Mix and match data types in a single
CausalVecorCausalGraph. - Zero-Copy Cloning: The
Customvariant usesArcfor cheap cloning of complex data. - Algebraic Support: Native integration with
deep_causality_tensoranddeep_causality_multivector. - Topology Support: Native integration with
deep_causality_topology(PointClouds, Complexes, Manifolds). - Ergonomics: Extensive
From<T>implementations for seamless type conversion.
Usage
Add this to your Cargo.toml:
[]
= "0.0.1"
Examples
Basic Usage
use ;
Algebraic Types
use EffectData;
use CausalTensor;
use CausalMultiVector;
Topology Types
use EffectData;
use CausalTensor;
use ;
Custom Types
For types not natively covered, use the Custom variant:
use EffectData;
Architecture
The EffectData enum is defined as:
License
This project is licensed under the MIT license.