Crate deep_causality

Crate deep_causality 

Source
Expand description

DeepCausality is a hyper-geometric computational causality library that enables fast and deterministic context-aware causal reasoning over complex causality models.

Why DeepCausality?

  • DeepCausality is written in Rust with production-grade safety, reliability, and performance in mind.
  • DeepCausality provides recursive causal data structures that concisely express arbitrary complex causal structures.
  • DeepCausality enables context awareness across data-like, time-like, space-like, spacetime-like entities stored within (multiple) context-hyper-graphs.
  • DeepCausality simplifies modeling of complex tempo-spatial patterns.
  • DeepCausality comes with Causal State Machine (CSM)

Modules§

causal_type
causaloid
causaloid_graph
context_graph
contextoid_type
graph
graph_explaining
graph_reasoning
math_utils
model_validation_error
time_utils
utils_test

Structs§

ActionError
AdjustmentError
Assumption
BaseSymbol
BuildError
CSM
Causal State Machine (CSM)
CausalAction
A CausalAction represents an executable action that can be triggered in response to causal conditions.
CausalGraphIndexError
CausalSetSpacetime
A symbolic, discrete model of spacetime based on causal set theory (CST).
CausalState
A CausalState represents a state in a causal state machine (CSM) that can be evaluated based on causal conditions.
CausalityError
CausalityGraphError
Causaloid
CausaloidGraph
A specialized graph structure for representing and reasoning about causal relationships.
ConformalSpacetime
A minimal spacetime model preserving only causal and angular structure, based on conformal geometry.
Context
ContextIndexError
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.
EffectEthos
The EffectEthos provides a reasoning engine for deontic inference. It encapsulates all the necessary components to evaluate a proposed action against a set of teleological norms (Teloids).
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 (WGS84).
IndexError
Inference
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.
MinkowskiSpacetime
A 4D spacetime context based on the Minkowski metric of special relativity.
Model
NedSpace
A local tangent-plane spatial context using the North-East-Down (NED) reference frame.
Observation
ProposedAction
Represents an action that the system intends to perform, submitted for evaluation by the Effect Ethos.
QuaternionSpace
A spatial context representing 3D orientation using unit quaternions.
Root
SymbolicTime
A symbolic time representation for use in logic-based, non-numeric, or event-driven causal systems.
TagIndex
TangentSpacetime
A 4D+4D spacetime model combining position and motion, with support for curved geometry.
Teloid
TeloidGraph
A graph structure representing the relationships between Teloids (norms).
TeloidStore
A generic, in-memory storage for Teloids, indexed by their unique ID.
UncertainBooleanData
UncertainFloat64Data
UncertainParameter
UpdateError
Verdict
Represents the final, justified outcome of a deontic evaluation.

Enums§

ActionParameterValue
Represents a value for a parameter within a ProposedAction. This allows the parameters map to hold values of different types.
AggregateLogic
Defines how the results from a collection of Causable items should be aggregated.
AssumptionError
CausaloidType
Represents the structural type of a Causaloid.
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
CsmError
DeonticError
Errors related to the Deontic Inference process within the Effect Ethos.
GenerativeOutput
Represents the possible actions or state changes that can result from a generative process.
GenerativeTrigger
A concrete, type-safe definition of all possible triggers.
ModelBuildError
ModelGenerativeError
ModelValidationError
PropagatingEffect
Unified data and control-flow container for causal reasoning.
RelationKind
SpaceKind
An enumeration over supported spatial context types.
SpaceTimeKind
A polymorphic enum over supported spacetime context types.
SymbolKind
SymbolicRepresentation
SymbolicRepr defines a general-purpose symbolic representation that supports identifiers, logical operations, expressions, and compound terms.
SymbolicResult
SymbolicTimeUnit
Represents a symbolic unit of time with a qualitative relationship to named events.
TeloidModal
Represents the modal status of a teloid, indicating its obligation or permissibility.
TeloidRelation
Defines the nature of a relationship between two Teloids in the TeloidGraph.
TimeKind
An enumeration of supported time models for unified, heterogeneous temporal reasoning.
TimeScale

Traits§

Adjustable
Assumable
The Assumable trait defines the interface for objects that represent assumptions that can be tested and verified. Assumable types must also implement Identifiable.
AssumableReasoning
The AssumableReasoning trait provides default implementations for common operations over collections of Assumable types.
Causable
The Causable trait defines the core behavior for all causal elements.
CausableCollection
CausableCollectionAccessor
CausableCollectionExplaining
CausableCollectionReasoning
Provides default implementations for reasoning over collections of Causable items.
CausableGraph
The CausableGraph trait defines the core interface for a causal graph.
CausableGraphExplaining
The CausableGraphExplaining trait provides methods to generate natural language explanations from a causal graph.
CausableGraphReasoning
Describes signatures for causal reasoning and explaining in causality hyper graph.
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.
DeonticExplainable
A trait for explaining the reasoning behind a deontic verdict.
DeonticInferable
Defines the public API for a deontic reasoning engine.
ExtendableContextuableGraph
Trait for poly-contextuable causal graphs. By default, the context graph is assumed to be a single-context graph.
Generatable
Defines the core interface for a generative model capable of producing commands to modify a causal structure.
GenerativeProcessor
A trait for types that can process the output of a Generatable instance.
Identifiable
Trait for types that have a unique identifier.
Inferable
Trait for inferable types with causal reasoning properties.
InferableReasoning
Trait providing reasoning methods for collections of Inferable items.
Metric
Defines a measurable relationship between two entities within the same space.
MetricCoordinate
Represents coordinate-bearing entities that also implement distance metrics.
MetricTensor4D
Trait for exposing and modifying a local 4×4 spacetime metric tensor.
Observable
Observable trait for objects that can be observed.
ObservableReasoning
ObservableReasoning trait provides reasoning methods for collections of Observable items.
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.
Symbolic
Represents a symbolic, logical, or linguistic identity.
TeloidStorable
Teloidable
Defines the domain-specific API for a graph of Teloids.
Temporal
Represents entities that have intrinsic temporal properties.
TimeIndexable
Trait for types that can be indexed.
Transferable
UncertainAdjustable
UncertainDatable
Represents uncertain data entities in a context graph.

Type Aliases§

ArcRWLock
A type alias that combines Arc and RwLock to provide thread-safe shared mutable state.
BaseCausalGraph
A type alias for a CausaloidGraph composed of BaseCausaloid instances.
BaseCausalMap
A type alias for a HashMap that stores BaseCausaloid instances, typically indexed by their unique identifiers.
BaseCausaloid
A type alias for a default, general-purpose Causaloid configuration.
BaseCausaloidVec
A type alias for a Vec (vector) containing BaseCausaloid instances.
BaseContext
A type alias for a default, general-purpose Context configuration.
BaseContextoid
A type alias for a default, general-purpose Contextoid configuration.
BaseModel
A type alias for the default Model configuration.
BaseTeloidStore
A type alias for a default, general-purpose TeloidStore configuration.
CSMMap
CSMStateActions
CausalFn
The unified function signature for all singleton causaloids that do not require an external context.
CausaloidId
ComplexTensor
ContextId
ContextoidId
ContextualCausalFn
The unified function signature for all singleton causaloids that require access to a shared, external context.
DescriptionValue
A string value that provides a human-readable description of a Cause or Context A string value that provides a human-readable description of a Cause or Context
EffectGraph
EvalFn
Function type for evaluating numerical values and returning a boolean result. This remains unchanged as it serves a different purpose outside the core causal reasoning.
FloatType
A type alias for floating point numbers, used for numerical calculations
IdentificationValue
The unique identifier for a Cause or Context in the Causality Graph
NumberType
A type alias for unsigned integers, used for numerical counting and indexing
NumericalValue
A floating point value that represents a numerical measure
StateAction
A tuple consisting of a causal state and an associated causal action.
TeloidID
TeloidMetaData
TeloidTag
UncertainActivationPredicate
UniformCausalGraph
A type alias for a CausaloidGraph composed of UniformCausaloid instances.
UniformCausalMap
A type alias for a HashMap that stores UniformCausaloid instances, typically indexed by their unique identifiers.
UniformCausaloid
A type alias for a default, general-purpose Causaloid configuration that uses abstract “kind” enums for its spatial, temporal, and symbolic contexts.
UniformCausaloidVec
A type alias for a Vec (vector) containing UniformCausaloid instances.
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.
UniformModel
A type alias for a default, general-purpose Model configuration that uses abstract “kind” enums for its spatial, temporal, and symbolic contexts.