UNumflow 0.3.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package UNumflow --version 0.3.0
                    
NuGet\Install-Package UNumflow -Version 0.3.0
                    
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="UNumflow" Version="0.3.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="UNumflow" Version="0.3.0" />
                    
Directory.Packages.props
<PackageReference Include="UNumflow" />
                    
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 UNumflow --version 0.3.0
                    
#r "nuget: UNumflow, 0.3.0"
                    
#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 UNumflow@0.3.0
                    
#: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=UNumflow&version=0.3.0
                    
Install as a Cake Addin
#tool nuget:?package=UNumflow&version=0.3.0
                    
Install as a Cake Tool

UNumflow

.NET bindings for the u-numflow numerical library.

Features

  • Distributions: Uniform, Triangular, PERT, Normal, LogNormal, Weibull, Exponential, Gamma, Beta and χ² — Cdf, Quantile, Mean, Variance, and Sample(n, seed): the same seed always gives the same values, and the uniforms behind them come from the open interval (0, 1), so no variate is infinite
  • Interval sets: unions of half-open intervals [start, end) with Union, Intersection, Difference, Clip, Contains and a Measure that counts every point once, however much the input overlapped
  • Parameters are checked when you create a distribution — a Distribution that exists is a valid one

Installation

dotnet add package UNumflow

Usage

using UNumflow;

// Critical values and probabilities
var chi = Distribution.ChiSquared(4);
double critical = chi.Quantile(0.95);       // 9.4877…
double p = chi.Cdf(critical);               // 0.95

// Reproducible samples
double[] lives = Distribution.Weibull(shape: 2, scale: 100).Sample(1000, seed: 42);

// Coverage arithmetic: overlapping stops are down-time once
var planned = IntervalSet.From([(0, 24)]);
var unplanned = IntervalSet.From([(10, 30)]);
var week = IntervalSet.From([(0, 168)]);
double upHours = week.Difference(planned.Union(unplanned)).Measure; // 138

Errors

A refused request raises NumflowException. Message is readable text; Reason is a stable code to branch on and Details is the error body with the values behind it:

try
{
    Distribution.Normal(0, sigma: -1);
}
catch (NumflowException e)
{
    // e.Reason == "parameter_out_of_range"
    // e.Details: { "parameter": "distribution.sigma", "min": null, "exclusive_min": 0, "max": null, "got": -1, ... }
}
Reason Details Meaning
parameter_out_of_range parameter, min, max, got; exclusive_min / exclusive_max on an open end A distribution parameter that must be > 0 (exclusive_min 0); distribution.max not above min (exclusive_min = min) or distribution.mode outside [min, max] (min, max); p not strictly inside (0, 1) (exclusive_min 0, exclusive_max 1); a seed outside [0, 2⁵³] (min, max)
value_not_finite parameter, index A NaN or infinite parameter or interval bound
reversed_interval parameter, index An interval with start > end — refused, not swapped
unknown_option parameter, got, expected A distribution kind the engine does not have
malformed_input parameter A request the engine could not read
internal — An engine fault

In parameter_out_of_range, min and max are inclusive bounds and are always present — null when that end is unbounded or open. An open (exclusive) end is exclusive_min / exclusive_max, present only when the bound is open.

Platforms

The package carries the native library for win-x64, linux-x64 and linux-arm64 (glibc 2.39 or later), osx-x64 and osx-arm64; no separate install is needed.

License

MIT

Product Compatible and additional computed target framework versions.
.NET 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.
  • net10.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.8.1 105 10/20/2026
0.8.0 124 10/18/2026
0.7.0 146 10/16/2026
0.6.0 117 10/15/2026
0.5.0 124 10/14/2026
0.4.0 114 10/13/2026
0.3.0 99 10/13/2026
0.2.0 183 10/7/2026
0.1.0 114 10/7/2026