Aleator.Core 0.3.0-preview.1

This is a prerelease version of Aleator.Core.
dotnet add package Aleator.Core --version 0.3.0-preview.1
                    
NuGet\Install-Package Aleator.Core -Version 0.3.0-preview.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Aleator.Core" Version="0.3.0-preview.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Aleator.Core" Version="0.3.0-preview.1" />
                    
Directory.Packages.props
<PackageReference Include="Aleator.Core" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Aleator.Core --version 0.3.0-preview.1
                    
#r "nuget: Aleator.Core, 0.3.0-preview.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Aleator.Core@0.3.0-preview.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Aleator.Core&version=0.3.0-preview.1&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Aleator.Core&version=0.3.0-preview.1&prerelease
                    
Install as a Cake Tool

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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