Skip to main content

Module simulation_database

Module simulation_database 

Source
Expand description

SQLite-like in-memory simulation database with time-indexed snapshots, run-length-encoded compression, differential storage, event logging, result aggregation, and CSV/JSON import-export.

§Overview

Structs§

AggStats
Summary statistics computed over a sequence of scalar values.
CheckpointManager
Manages a rolling window of simulation checkpoints stored in memory.
DiffEntry
Differential storage entry: stores only the indices and new values that differ from the previous snapshot.
EventLog
Append-only timestamped event log for a simulation session.
LogEvent
A single logged event.
MetadataStore
A structured store for simulation-level metadata including git hash, build timestamp, and runtime parameters.
ParameterSweep
A multi-dimensional parameter sweep specification.
ProvenanceNode
A node in the provenance graph.
ProvenanceTracker
Directed acyclic graph for W3C-PROV-style provenance tracking.
QueryBuilder
A builder for composing multi-criteria queries over a SimulationDatabase.
ResultAggregator
Aggregates statistics over a collection of snapshots for a named field.
SimulationDatabase
In-memory database of simulation records with CSV/JSON persistence.
SimulationRecord
A single simulation run record storing parameters and metadata.
Snapshot
A single simulation snapshot: a named collection of scalar fields recorded at a given simulation time.
SnapshotTable
Time-indexed table of simulation snapshots with optional RLE compression and differential storage.

Enums§

EventLevel
Severity level for a logged event.
ProvenanceType
Discriminant for provenance graph nodes.

Functions§

rle_compression_ratio
Compression ratio: original_len / encoded_len (number of (value, count) pairs).
rle_decode
Decode a run-length-encoded slice back to a flat Vecf64`.
rle_encode
Encode a slice of f64 values using run-length encoding.