pub enum EffectData {
Bool(bool),
Float(f64),
Int(i64),
Numerical(NumericValue),
String(String),
Vector(Vec<EffectData>),
MultiVector(CausalMultiVector<f64>),
Tensor(CausalTensor<f64>),
PointCloud(PointCloud<f64, f64>),
SimplicialComplex(SimplicialComplex<f64>),
Manifold(Manifold<f64, f64>),
Custom(Arc<dyn Any + Send + Sync>),
}Expand description
EffectData represents a unified type for heterogeneous causal graphs.
It follows the “Atomic + Escape Hatch” pattern:
- Atomic Variants: Common types like
Bool,Float,Int,Vector. - Algebraic Variants:
MultiVectorandTensor(fixed tof64backing for simplicity). - Escape Hatch:
Customvariant for any other complex type, using type erasure viaArc.
Variants§
Bool(bool)
Boolean value (e.g., activation status).
Float(f64)
Floating-point value (standard numeric data).
Int(i64)
Integer value (counts, discrete states).
Numerical(NumericValue)
A generic NumericalValue (u8..u128, i8..i128, f32, f64).
String(String)
String value (labels, identifiers).
Vector(Vec<EffectData>)
A vector of EffectData, enabling recursive heterogeneous collections.
MultiVector(CausalMultiVector<f64>)
A generic MultiVector (Geometric Algebra), fixed to f64.
Tensor(CausalTensor<f64>)
A generic CausalTensor, fixed to f64.
PointCloud(PointCloud<f64, f64>)
A PointCloud (0-Complex), fixed to f64.
SimplicialComplex(SimplicialComplex<f64>)
A SimplicialComplex (Higher-order structure).
Manifold(Manifold<f64, f64>)
A Manifold (Valid SimplicialComplex), fixed to f64.
Custom(Arc<dyn Any + Send + Sync>)
An escape hatch for storing any other type that implements Any + Send + Sync.
Note: This uses Arc to support cheap cloning of the reference.
Implementations§
Source§impl EffectData
impl EffectData
Sourcepub fn from_custom<T: Any + Send + Sync + 'static>(val: T) -> Self
pub fn from_custom<T: Any + Send + Sync + 'static>(val: T) -> Self
Creates a Custom variant from any compatible type.
Trait Implementations§
Source§impl Clone for EffectData
impl Clone for EffectData
Source§fn clone(&self) -> EffectData
fn clone(&self) -> EffectData
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more