Lyo.Mathematics
1.0.2
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
<PackageReference Include="Lyo.Mathematics" Version="1.0.2" />
<PackageVersion Include="Lyo.Mathematics" Version="1.0.2" />
<PackageReference Include="Lyo.Mathematics" />
paket add Lyo.Mathematics --version 1.0.2
#r "nuget: Lyo.Mathematics, 1.0.2"
#:package Lyo.Mathematics@1.0.2
#addin nuget:?package=Lyo.Mathematics&version=1.0.2
#tool nuget:?package=Lyo.Mathematics&version=1.0.2
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/Matrix3x3—M11…M33,Identity(2×2); used byLinearAlgebraFunctionsin 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
FormulaDescriptor—recordwithId,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*Functionstypes.
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
Dependencies
Generated from ProjectReference / PackageReference (same model as docs/Lyo.ProjectGraph.html).
Lyo.Common— (direct, lyo)Lyo.Exceptions— (direct, lyo)Microsoft.Extensions.Logging.Abstractions10.0.5— (transitive, microsoft)System.Memory4.6.3— (transitive, microsoft, netstandard2.0)System.Text.Json10.0.5— (transitive, microsoft, netstandard2.0)
| Product | Versions 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. |
-
.NETStandard 2.0
- Lyo.Common (>= 1.0.2)
- Lyo.Exceptions (>= 1.0.2)
-
net10.0
- Lyo.Common (>= 1.0.2)
- Lyo.Exceptions (>= 1.0.2)
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.