Lyo.Mathematics 1.0.2

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

Lyo.Mathematics

C# contracts for the Lyo math stack: physical quantities as structs, 2D/3D vectors and small matrices, typed inputs/results for formulas, and a small registry for discoverability. Numerical implementations live in Lyo.Mathematics.Functions (F#).

Target frameworks: netstandard2.0, net10.0

Namespaces and folders

Area Namespace Purpose
Quantities Lyo.Mathematics.Quantities Strongly typed SI-oriented values (length, mass, angles, …) with factory methods and operators.
Vectors Lyo.Mathematics.Vectors Vector2D, Vector3D — magnitude, normalize, dot/cross (3D), projections, angles.
Matrices Lyo.Mathematics.Matrices Matrix2x2, Matrix3x3 — element storage for linear algebra functions.
Models Lyo.Mathematics.Models DTO-style record/struct inputs and results for statistics, calculus, physics, finance, etc.
Units (enums) Lyo.Mathematics.Units LengthUnit, MassUnit, AngleUnit, TimeUnit for display or conversions where used.
Registry Lyo.Mathematics.Registry MathematicsFormulaRegistry, FormulaDescriptor — curated ids for UIs or docs.
(root) Lyo.Mathematics MathematicsWorkflowExtensions — a few C# convenience extensions.

Internal helpers (MathematicsDisplayFormat, MathValueGuards) support consistent ToString() and finite/non-negative validation on quantity constructors.


Quantities (Lyo.Mathematics.Quantities)

Most quantities are readonly record struct types holding a canonical SI scalar (e.g. meters, kilograms) plus From* factories, common derived accessors, and arithmetic where meaningful. Non-finite or out-of-range values throw via ArgumentHelpers / MathValueGuards as documented per type.

Type SI core (conceptual)
Length meters
Mass kilograms
TimeInterval seconds
Angle radians (with degree helpers)
Area square meters
Volume cubic meters
Velocity m/s
Acceleration m/s²
Force newtons
Momentum kg·m/s
Energy joules
Power watts
Pressure pascals
Density kg/m³
Temperature kelvin (with Celsius helpers)
Frequency hertz
ElectricCurrent amperes
Voltage volts
Resistance ohms
Capacitance farads
Torque N·m
AngularVelocity rad/s
AngularAcceleration rad/s²
AngularMomentum kg·m²/s
MomentOfInertia kg·m²
SpringConstant N/m
VolumetricFlowRate m³/s
MassFlowRate kg/s
DynamicViscosity Pa·s
KinematicViscosity m²/s
ThermalConductivity W/(m·K)
SpecificHeatCapacity J/(kg·K)
ThermalExpansionCoefficient 1/K
HeatTransferCoefficient W/(m²·K)
ModulusOfElasticity Pa
Entropy J/K
AreaMomentOfInertia m⁴
FractureToughness Pa·m^(1/2)

Vectors and matrices

  • Vector2D / Vector3D — components, Magnitude, Normalize(), Dot, Cross (3D), AngleBetween, Project, scalar multiply, add/subtract.
  • Matrix2x2 / Matrix3x3M11M33, Identity (2×2); used by LinearAlgebraFunctions in the F# assembly.

Models (Lyo.Mathematics.Models)

  • Algebra / polynomials: PolynomialInput, QuadraticEquationInput, QuadraticEquationResult, LinearSystem2x2Input, LinearSystem2x2Result, Eigen2x2Result, ComplexNumber.
  • Calculus / numerics: NumericalIntegrationInput, AdaptiveIntegrationInput, DifferentiationInput, OdeInput, OdeStepResult, VectorFunctionInput, ScalarMultivariateFunctionInput, GradientDescentInput, OptimizationResult, InterpolationInput.
  • Statistics: WeightedValuesInput, LinearRegressionInput, LinearRegressionResult, DescriptiveStatisticsResult, QuartilesResult, WeightedStatisticsResult, CovarianceCorrelationResult, ConfidenceIntervalResult, distribution parameter records (NormalDistributionParameters, BinomialDistributionParameters, PoissonDistributionParameters, ExponentialDistributionParameters, UniformDistributionParameters, GeometricDistributionParameters, NegativeBinomialDistributionParameters), DistributionSummaryResult.
  • Geometry: CircleMeasurementInput, RectangleMeasurementInput, RightTriangleInput, TriangleInput.
  • Physics / engineering: MomentumInput, ForceInput, KineticEnergyInput, AverageVelocityInput, ProjectileMotionInput, ProjectileMotionResult, AngularMotionInput, TorqueInput, PowerInput, ImpulseInput, SpringForceInput, WaveInput, Collision1DInput, Collision1DResult, GravitationalForceInput, IdealGasLawInput, BodyMassIndexInput, DensityInput, PressureInput, OhmsLawInput.
  • Finance: LoanPaymentInput, CashFlowSeriesInput.
  • Linear algebra: QrDecompositionResult, RootFindingResult.

Registry

  • FormulaDescriptorrecord with Id, Category, Library, Name, Description, Signature (human-oriented hint string).
  • MathematicsFormulaRegistry.All — small curated list of representative capabilities (FFT, QR, adaptive integration, law of cosines, descriptive statistics, arithmetic mean, etc.). Not an exhaustive index of every function; for that, see the Functions README and IDE metadata on *Functions types.

MathematicsWorkflowExtensions

Extension Description
ToMagnitudes(this ComplexNumber[] samples) double[] of Magnitude per element.
TryNormalize(this Vector3D vector, out Vector3D normalized) false and (0,0,0) if zero-length; else unit vector.

Repository

GitHub Repository

Dependencies

Generated from ProjectReference / PackageReference (same model as docs/Lyo.ProjectGraph.html).

  • Lyo.Common — (direct, lyo)
  • Lyo.Exceptions — (direct, lyo)
  • Microsoft.Extensions.Logging.Abstractions 10.0.5 — (transitive, microsoft)
  • System.Memory 4.6.3 — (transitive, microsoft, netstandard2.0)
  • System.Text.Json 10.0.5 — (transitive, microsoft, netstandard2.0)
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (4)

Showing the top 4 NuGet packages that depend on Lyo.Mathematics:

Package Downloads
Lyo.Scientific

Scientific contracts, datasets, engineering models, chemistry and astronomy records, and unit infrastructure built on top of the Lyo mathematics stack.

Lyo.Mathematics.Functions

F# implementations for arithmetic, algebra, statistics, calculus, physics, signal processing, optimization, and numerical tools used by the Lyo mathematics stack.

Lyo.Metrics.Statistics

Statistical analysis extensions for Lyo.Metrics histograms (percentiles, quartiles, moving averages, anomaly detection). Pulls in Lyo.Mathematics and Lyo.Mathematics.Functions so the base Lyo.Metrics can stay dependency-light.

Lyo.Scientific.Functions

F# scientific calculations for chemistry, astronomy, thermodynamics, fluid dynamics, compressible flow, and solid mechanics built on top of the Lyo scientific and mathematics contracts.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.0 253 9/9/2026
1.0.13 254 8/25/2026
1.0.11 247 8/23/2026
1.0.9 253 8/22/2026
1.0.6 242 8/20/2026
1.0.4 241 8/20/2026
1.0.3 242 8/19/2026
1.0.2 247 8/19/2026
1.0.1 244 8/18/2026
1.0.0 241 8/16/2026