Expand description
The context layer of DeepCausality.
A causal model reasons about something, and that something is the context: an explicit, typed
environment that a causaloid or a causal-monad chain reads while it runs. This crate owns that
environment — the Context hypergraph, the Contextoid nodes it holds, the node types for
data, space, time, spacetime and symbols, and the traits that describe them.
Context is a separate crate so that it is an opt-in dependency. Reasoning without context is the default case and costs nothing; a model that needs context declares this crate and imports from it, which keeps a dependency search honest about where context is used.
Because this crate sits beside deep_causality rather than above it, a consumer of the causal
monad can carry a typed context without depending on the causaloid stack:
use deep_causality_context::BaseContext;
use deep_causality_core::{PropagatingEffect, PropagatingProcess};
let ctx = BaseContext::with_capacity(1, "demo", 10);
let process: PropagatingProcess<f64, (), BaseContext> =
PropagatingProcess::with_state(PropagatingEffect::pure(1.0), (), Some(ctx));See https://docs.deepcausality.com/ for the documentation.
Modules§
Structs§
- Adjustment
Error - Causal
SetSpacetime - A symbolic, discrete model of spacetime based on causal set theory (CST).
- Conformal
Spacetime - A minimal spacetime model preserving only causal and angular structure, based on conformal geometry.
- Context
- Context
Index Error - Context
Store - Projection, then storage, in one place.
- Contextoid
- Data
- A generic container for a piece of data, associated with a unique identifier.
- Discrete
Time - A time model representing discrete, uniformly spaced ticks instead of continuous physical time.
- Ecef
Space - A spatial context in Earth-Centered, Earth-Fixed (ECEF) coordinates.
- Entropic
Time - A time model based on entropy-driven progression, suitable for emergent systems, self-organization, and irreversible state evolution.
- Euclidean
Space - A 3-dimensional spatial context represented in standard Euclidean coordinates (x, y, z).
- Euclidean
Spacetime - A concrete 3D + time context based on classical (Euclidean) geometry.
- Euclidean
Time - A time model based on Euclidean (imaginary) time, primarily used in theoretical and computational physics.
- GeoSpace
- A non-Euclidean spatial context based on geodetic coordinates.
- Index
Error - Lorentzian
Spacetime - A 4-dimensional spacetime context based on Lorentzian geometry, as used in General Relativity.
- Lorentzian
Time - A time model representing Lorentzian (physical) time in relativistic spacetimes.
- NedSpace
- A local tangent-plane spatial context using the North-East-Down (NED) reference frame.
- NoSpace
Time - The absence of a spatial extent, as a type.
- Root
- Store
Error - Why a store operation failed: the backend refused, the substrate refused, or the projection between records and nodes did.
- Substrate
Ref - Where a data node’s value is stored, for a context that outlives the process.
- Symbolic
Time - A symbolic time representation for use in logic-based, non-numeric, or event-driven causal systems.
- Tangent
Spacetime - A 4D+4D spacetime model combining position and motion, with support for curved geometry.
- Uncertain
Bool Data - A context node holding an uncertain truth value.
- Uncertain
Data - A context node holding a real-valued uncertain quantity.
- Update
Error
Enums§
- Context
Kind - Enum of monoidal context node types (each a composable unit of structure).
Each variant name ends in
-oidto emphasize its monoid role as a single identity-bearing unit. - Contextoid
Type - Relation
Kind - The kind of relation an edge in a
Contextcarries. - Space
Kind - An enumeration over supported spatial context types.
- Space
Time Kind - A polymorphic enum over supported spacetime context types.
- Store
Error Enum - The classification of a store failure.
- Symbolic
Time Unit - Represents a symbolic unit of time with a qualitative relationship to named events.
- Time
Kind - An enumeration of supported time models for unified, heterogeneous temporal reasoning.
- Time
Scale - Vertical
Datum - The reference an altitude is measured against.
Traits§
- Adjustable
- Contextuable
- Represents any entity that participates in a causal context graph.
- Contextuable
Graph - Trait for graph containing context-aware nodes.
- Coordinate
- Provides a generalized interface for N-dimensional coordinate access.
- Current
Data Index - Current
Time Index - Data
Indexable - Datable
- Represents data-bearing entities in a context graph.
- Distance
- Defines a measurable relationship between two entities within the same space.
- Extendable
Contextuable Graph - Trait for poly-contextuable causal graphs. By default, the context graph is assumed to be a single-context graph.
- Identifiable
- Trait for types that have a unique identifier.
- Metric
Signature - Reports the metric signature a spacetime node is in.
- Metric
Tensor4D - Trait for exposing and modifying a local 4×4 spacetime metric tensor.
- Previous
Data Index - Previous
Time Index - Trait for getting and setting the previous time index for various time scales.
- Scalar
Projector - A trait that defines how to extract a scalar value from a structured input type.
- Scalar
Value - Marker trait to identify numeric scalar types.
- Space
Temporal - Combines spatial and temporal semantics into a 4D spacetime model.
- Space
Temporal Interval - Trait for spacetime types that support Minkowski-style interval calculations.
- Spatial
- Marks entities that have spatial semantics.
- Storable
- A data payload that one
DataRecorddescribes completely, in both directions. - Temporal
- Represents entities that have intrinsic temporal properties.
- Time
Indexable - Trait for types that can be indexed.
- Uncertain
Adjustable - Uncertain
Datable - Represents uncertain data entities in a context graph.
Type Aliases§
- Base
Context - A type alias for a default, general-purpose
Contextconfiguration. - Base
Contextoid - A type alias for a default, general-purpose
Contextoidconfiguration. - Context
Id - The identifier of a
Context. - Contextoid
Id - The identifier of a
Contextoidwithin aContext. - Float
Type - The floating-point type this crate’s ready-made aliases are built at.
- Substrate
Context - The shape a store that holds references accepts: the three
Kindenums, for which the projection is total, and a data node that holds where its value lives rather than the value. - Substrate
Contextoid - The contextoid of a
SubstrateContext. - Uniform
Context - A type alias for a default, general-purpose
Contextconfiguration that uses abstract “kind” enums for its spatial, temporal, and symbolic contexts. - Uniform
Contextoid - A type alias for a default, general-purpose
Contextoidconfiguration that uses abstract “kind” enums for its spatial, temporal, and symbolic contexts.