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 - An element of a causal set, with the elements that precede it.
- Context
- Context
Index Error - Context
Store - Projection, then storage, in one place.
- Contextoid
- Coordinate
Error - A coordinate outside the range of its chart, or not finite: a latitude beyond ±90°.
- 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 position in the WGS 84 Earth-centred, Earth-fixed (ECEF) Cartesian coordinate system, in metres.
- Entropic
Time - A time model based on entropy-driven progression, suitable for emergent systems, self-organization, and irreversible state evolution.
- Euclidean
Space - A point of three-dimensional Euclidean space, in Cartesian coordinates
x, y, z. - Galilean
Spacetime - An event of Galilean spacetime, in the coordinates
(t, x, y, z)of an inertial frame. - GeoSpace
- A position given by WGS 84 geodetic latitude and longitude, in degrees, and an altitude in
metres measured against a
VerticalDatum. - Index
Error - Metric
Tensor Error - A metric tensor refused by
MetricTensor4D::update_metric_tensor:MetricTensorErrorEnumnames the rule it breaks. - Minkowski
Spacetime - An event of Minkowski spacetime, in the coordinates
(t, x, y, z)of an inertial frame. - Minkowski
Time - The coordinate time
tof an inertial frame of Minkowski spacetime, counted intime_scaleunits. - NedSpace
- A position in a local north-east-down (NED) Cartesian frame, in metres.
- Newtonian
Spacetime - An event of Newtonian spacetime, in coordinates
(t, x, y, z)at rest in its absolute space. - Newtonian
Time - The absolute time of a classical spacetime: an instant, as a real number counted in
time_scaleunits. - NoSpace
- The absence of a spatial position, as a type: it fills the spatial slot of a
Contextwhose graph holds no spatial node. - NoSpace
Time - The absence of a spacetime position, as a type: it fills the spacetime slot of a
Contextwhose graph holds no spacetime node. - NoTime
- The absence of time, as a type: it fills the temporal slot of a
Contextwhose graph holds no time node. - 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 - An event
pof a relativistic spacetime, a tangent vector atp, and the metric tensorg_ab(p)there, in coordinates(t, x, y, z)withtin seconds andx, y, zin metres. - 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 - Metric
Tensor Error Enum - The rule a refused metric tensor breaks. Indices follow the coordinate order
t, x, y, z. - Relation
Kind - The kind of relation an edge in a
Contextcarries. - Space
Kind - An enumeration over supported spatial context types.
- Space
Time Kind - One of the spacetime types a context can hold, so that a single spacetime slot can carry events of different geometries.
- 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 - One of the time types a context can hold, so that a single time slot can carry nodes of different kinds.
- 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
- The distance between two points of the same type, as a length.
- 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 signature of the metric a spacetime node measures separations with, with
generator
ithe node’s coordinatei. - Metric
Tensor4D - Read and write access to the metric tensor
g_abat a spacetime event. - 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 - An event of a spacetime: a node with a position and a time.
- Space
Temporal Interval - The interval between two events of Minkowski spacetime,
- 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 context in the classical frame: numeric data, positions in Euclidean space, absolute time, and events of Newtonian spacetime.
- Base
Contextoid - A contextoid of
BaseContext: one node holding numeric data (aDatoid), a position in Euclidean space (aSpaceoid), an instant of absolute time (aTempoid) or an event of Newtonian spacetime (aSpaceTempoid). - 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 spacetime slots. - Uniform
Contextoid - A type alias for a default, general-purpose
Contextoidconfiguration that uses abstract “kind” enums for its spatial, temporal and spacetime slots.