Aleator.Core
0.3.0-preview.1
dotnet add package Aleator.Core --version 0.3.0-preview.1
NuGet\Install-Package Aleator.Core -Version 0.3.0-preview.1
<PackageReference Include="Aleator.Core" Version="0.3.0-preview.1" />
<PackageVersion Include="Aleator.Core" Version="0.3.0-preview.1" />
<PackageReference Include="Aleator.Core" />
paket add Aleator.Core --version 0.3.0-preview.1
#r "nuget: Aleator.Core, 0.3.0-preview.1"
#:package Aleator.Core@0.3.0-preview.1
#addin nuget:?package=Aleator.Core&version=0.3.0-preview.1&prerelease
#tool nuget:?package=Aleator.Core&version=0.3.0-preview.1&prerelease
Aleator.Core
Core primitives of Aleator, the .NET 10 / C# port of the Figaro
probabilistic programming library: Element<T>, Universe, SampleContext, seeded IRandomSource,
atomic and compound elements (Constant, Flip, Select, Apply, Chain, If, Dist), evidence
(Observe / AddCondition / AddConstraint / AddLogConstraint) and the Values support facade.
Most applications reference Aleator.Algorithms (which pulls in Core and Library transitively)
and model through the Aleator.Language.Alea static facade:
using static Aleator.Language.Alea;
using Aleator.Algorithm.Factored;
var universe = Aleator.Language.Universe.CreateNew("demo", makeCurrent: false, seed: 42);
using var _ = universe.WithCurrent();
var rain = Flip(0.2);
var sprinkler = If(rain, Flip(0.01), Flip(0.4));
using var ve = new VariableElimination(universe, rain);
ve.Start();
CreateNew retains its historical makeCurrent: true default for compatibility. Scoped code should pass
makeCurrent: false explicitly and enter it with WithCurrent() as shown above, so nested models and
exceptions restore the previous ambient universe.
An omitted seed uses a process-wide collision-free allocator bootstrapped from operating-system entropy.
Passing the same explicit seed: remains deterministic and produces the same random sequence.
Public graph collections are exposed through defensive read-only views. In particular,
Element.Arguments, Universe.Elements, and the flattened SampleContext.Values snapshot cannot be
cast back to a mutable collection to alter model or sample state.
Only runtime dependency: System.Numerics.Tensors (SIMD hot paths).
Docs, 137 runnable examples and the full test suite: github.com/deecalov/Aleator.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- System.Numerics.Tensors (>= 10.0.9)
-
net8.0
- System.Numerics.Tensors (>= 10.0.9)
NuGet packages (6)
Showing the top 5 NuGet packages that depend on Aleator.Core:
| Package | Downloads |
|---|---|
|
Aleator.Library
Standard library of probabilistic elements (atomic continuous/discrete, collections, references, decisions) for Aleator. |
|
|
Aleator.AutoDiff
Reverse-mode automatic differentiation, unconstraining transforms, and a differentiable joint-density builder for gradient-based inference (HMC/NUTS/ADVI/SVGD, Gaussian processes) in Aleator. |
|
|
Aleator.DependencyInjection
Microsoft.Extensions.DependencyInjection integration for Aleator (per-request Universe, RandomSource factory, IInferenceEngine adapters). |
|
|
Aleator.MLNet
ML.NET adapter for Aleator — exposes probabilistic-model inference as an ML.NET CustomMapping transform and a prediction-engine facade, so ASP.NET Core teams consume Aleator posteriors through their existing ML.NET / DI surface. |
|
|
Aleator.Algorithms
Inference algorithms (VE, BP, Importance, Metropolis-Hastings, Gibbs, EM, particle filtering, lazy, structured, causal) for Aleator. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.3.0-preview.1 | 95 | 9/6/2026 |