Skip to main content

Crate deep_causality_context

Crate deep_causality_context 

Source
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§

context_graph
contextoid_type
utils_test

Structs§

AdjustmentError
CausalSetSpacetime
A symbolic, discrete model of spacetime based on causal set theory (CST).
ConformalSpacetime
A minimal spacetime model preserving only causal and angular structure, based on conformal geometry.
Context
ContextIndexError
ContextStore
Projection, then storage, in one place.
Contextoid
Data
A generic container for a piece of data, associated with a unique identifier.
DiscreteTime
A time model representing discrete, uniformly spaced ticks instead of continuous physical time.
EcefSpace
A spatial context in Earth-Centered, Earth-Fixed (ECEF) coordinates.
EntropicTime
A time model based on entropy-driven progression, suitable for emergent systems, self-organization, and irreversible state evolution.
EuclideanSpace
A 3-dimensional spatial context represented in standard Euclidean coordinates (x, y, z).
EuclideanSpacetime
A concrete 3D + time context based on classical (Euclidean) geometry.
EuclideanTime
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.
IndexError
LorentzianSpacetime
A 4-dimensional spacetime context based on Lorentzian geometry, as used in General Relativity.
LorentzianTime
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.
NoSpaceTime
The absence of a spatial extent, as a type.
Root
StoreError
Why a store operation failed: the backend refused, the substrate refused, or the projection between records and nodes did.
SubstrateRef
Where a data node’s value is stored, for a context that outlives the process.
SymbolicTime
A symbolic time representation for use in logic-based, non-numeric, or event-driven causal systems.
TangentSpacetime
A 4D+4D spacetime model combining position and motion, with support for curved geometry.
UncertainBoolData
A context node holding an uncertain truth value.
UncertainData
A context node holding a real-valued uncertain quantity.
UpdateError

Enums§

ContextKind
Enum of monoidal context node types (each a composable unit of structure). Each variant name ends in -oid to emphasize its monoid role as a single identity-bearing unit.
ContextoidType
RelationKind
The kind of relation an edge in a Context carries.
SpaceKind
An enumeration over supported spatial context types.
SpaceTimeKind
A polymorphic enum over supported spacetime context types.
StoreErrorEnum
The classification of a store failure.
SymbolicTimeUnit
Represents a symbolic unit of time with a qualitative relationship to named events.
TimeKind
An enumeration of supported time models for unified, heterogeneous temporal reasoning.
TimeScale
VerticalDatum
The reference an altitude is measured against.

Traits§

Adjustable
Contextuable
Represents any entity that participates in a causal context graph.
ContextuableGraph
Trait for graph containing context-aware nodes.
Coordinate
Provides a generalized interface for N-dimensional coordinate access.
CurrentDataIndex
CurrentTimeIndex
DataIndexable
Datable
Represents data-bearing entities in a context graph.
Distance
Defines a measurable relationship between two entities within the same space.
ExtendableContextuableGraph
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.
MetricSignature
Reports the metric signature a spacetime node is in.
MetricTensor4D
Trait for exposing and modifying a local 4×4 spacetime metric tensor.
PreviousDataIndex
PreviousTimeIndex
Trait for getting and setting the previous time index for various time scales.
ScalarProjector
A trait that defines how to extract a scalar value from a structured input type.
ScalarValue
Marker trait to identify numeric scalar types.
SpaceTemporal
Combines spatial and temporal semantics into a 4D spacetime model.
SpaceTemporalInterval
Trait for spacetime types that support Minkowski-style interval calculations.
Spatial
Marks entities that have spatial semantics.
Storable
A data payload that one DataRecord describes completely, in both directions.
Temporal
Represents entities that have intrinsic temporal properties.
TimeIndexable
Trait for types that can be indexed.
UncertainAdjustable
UncertainDatable
Represents uncertain data entities in a context graph.

Type Aliases§

BaseContext
A type alias for a default, general-purpose Context configuration.
BaseContextoid
A type alias for a default, general-purpose Contextoid configuration.
ContextId
The identifier of a Context.
ContextoidId
The identifier of a Contextoid within a Context.
FloatType
The floating-point type this crate’s ready-made aliases are built at.
SubstrateContext
The shape a store that holds references accepts: the three Kind enums, for which the projection is total, and a data node that holds where its value lives rather than the value.
SubstrateContextoid
The contextoid of a SubstrateContext.
UniformContext
A type alias for a default, general-purpose Context configuration that uses abstract “kind” enums for its spatial, temporal, and symbolic contexts.
UniformContextoid
A type alias for a default, general-purpose Contextoid configuration that uses abstract “kind” enums for its spatial, temporal, and symbolic contexts.