UNumflow 0.2.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package UNumflow --version 0.2.0
NuGet\Install-Package UNumflow -Version 0.2.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.2.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="UNumflow" Version="0.2.0" />
<PackageReference Include="UNumflow" />
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.2.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: UNumflow, 0.2.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.2.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.2.0
#tool nuget:?package=UNumflow&version=0.2.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
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, andSample(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)withUnion,Intersection,Difference,Clip,Containsand aMeasurethat counts every point once, however much the input overlapped - Parameters are checked when you create a distribution — a
Distributionthat 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": 0, "max": null, "got": -1, ... }
}
Reason |
Details | Meaning |
|---|---|---|
parameter_out_of_range |
parameter, min, max (or null), got |
A distribution parameter that must be > 0; p not strictly inside (0, 1); a seed outside [0, 2⁵³] |
invalid_option |
parameter |
Parameters out of order: min < max, min ≤ mode ≤ 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 |
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 | Versions 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.