Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
5bbd093
Fix bugs and remove dead code
HadenSmith Dec 29, 2025
16a1d63
Fix flipped Assert.AreEqual arguments in unit tests
HadenSmith Dec 29, 2025
251b656
Fix flipped Assert.AreEqual arguments in unit tests
HadenSmith Dec 29, 2025
abfa86f
Updates for collections, time series download, json serialization, co…
HadenSmith Feb 21, 2026
6fbea85
feat: Add XElement serialization to link functions and LinkController
HadenSmith Feb 24, 2026
1fdca07
fix: use Assert.Throws instead of ExpectedException in link function …
HadenSmith Feb 24, 2026
ecd6946
Improving covariance estimation, link functions, and integration.
HadenSmith Feb 25, 2026
ef3285b
Adding the multivariate student-t distribution, multinomial, dirichle…
HadenSmith Mar 5, 2026
08faeb7
Adding the multivariate student-t distribution, multinomial, dirichle…
HadenSmith Mar 5, 2026
43b6b32
Significant updates to eliminate null reference warnings in Numerics …
HadenSmith Mar 6, 2026
2653c7e
Improvements to linear regression and generalized linear model. Fixed…
HadenSmith Mar 6, 2026
9ee91ab
Fixed bugs in BootstrapAnalysis and UncertainyAnalysisResults. Added …
HadenSmith Mar 6, 2026
62421c9
Fixed CDF bugs with NoncentralT. Improved unit testing to prove it ma…
HadenSmith Mar 6, 2026
5f33504
Add .NET 10 target framework to Numerics and Test_Numerics
HadenSmith Mar 6, 2026
4100d1c
completed local warning fixes.
tikig21 Dec 30, 2025
54bc85a
staging merge
tikig21 Dec 30, 2025
bb9df30
time series download fixes
tikig21 Dec 31, 2025
3aa8d99
NuGet best practices
Brennan1994 Sep 17, 2025
cd97eab
target suppress warnings - remove blanket suppress
Brennan1994 Sep 17, 2025
cdde1f2
Cleanup Compiler Warnings
Brennan1994 Sep 17, 2025
b8eb8e5
Cleanup binaries and tmp files in VC
Brennan1994 Sep 17, 2025
c73766e
Test Proj Compiler Warnings
Brennan1994 Sep 17, 2025
35718a4
Replace Obsolete BinaryFormatter with System.Text.Json
Brennan1994 Sep 17, 2025
eb2d8d0
Establish workflows
Brennan1994 Sep 17, 2025
7ebbaaf
remove unused public property
Brennan1994 Oct 25, 2025
1ee2a3c
Fix duplicate FromByteArrayLegacy method from merge
HadenSmith Mar 6, 2026
53254a4
Add draft JOSS manuscript and bibliography
HadenSmith Feb 1, 2026
2172875
Add JOSS LaTeX template version of manuscript
HadenSmith Feb 1, 2026
4ae029f
Remove LaTeX files - JOSS uses markdown format
HadenSmith Feb 7, 2026
42c4e55
Fix critical documentation issues and add hydrologic examples
HadenSmith Feb 3, 2026
eb42549
Clean documentation for JOSS submission - comprehensive review
HadenSmith Feb 3, 2026
af5471b
Add Python demos project scope document
HadenSmith Jan 15, 2026
f23f18a
Fixing minor bugs, mainly guarding against div by zero possibilities.
HadenSmith Mar 6, 2026
8bd4dfb
Significant updates to documentation. Fixes api reference errors, imp…
HadenSmith Mar 7, 2026
2aebd06
Fixed api errors in docs. Fixed bugs in HMC and AugmentedLagrange met…
HadenSmith Mar 7, 2026
0b12ef6
Improving technical content of docs
HadenSmith Mar 8, 2026
3b902f8
Updating technical content of docs and improving navigation
HadenSmith Mar 8, 2026
d8b5058
Added tail dependency to copulas. Added seasonal decomposition to tim…
HadenSmith Mar 8, 2026
4f91155
Fixing brokern math symbols, updating JOSS paper.
HadenSmith Mar 8, 2026
e8a8e2f
Fix formatting of mathematical expressions in markdown
HadenSmith Mar 8, 2026
4fab3a6
Fix formatting of array notation in documentation
HadenSmith Mar 8, 2026
01d0f9c
Fix markdown formatting for PDF equation and distributions
HadenSmith Mar 8, 2026
1a0b355
Updating license formatting
HadenSmith Mar 8, 2026
9c8dff8
Revert "Updating license formatting"
HadenSmith Mar 8, 2026
6fcd54d
Revise paper content and update topics
HadenSmith Mar 8, 2026
2cd7c83
Editing and improving JOSS paper
HadenSmith Mar 8, 2026
bb0a3b1
Enhancing paper
HadenSmith Mar 9, 2026
1812365
Update publication year from 2019 to 2018
HadenSmith Mar 8, 2026
8c13618
Minor edit
HadenSmith Mar 9, 2026
cc58b63
Edits to paper
HadenSmith Mar 9, 2026
cb67f3f
Comprehensive bugfixes, correctness improvements, and code quality en…
HadenSmith Mar 13, 2026
655db4f
Fix test regressions and refactor NoncentralT.ZBrent to use Brent.Solve
HadenSmith Mar 13, 2026
afe7a00
Adding new workflow that triggers on GitHub Release publish, builds a…
HadenSmith Mar 20, 2026
ae06c34
Minor bug fixes in hypothesis tests, MGBT, binomial. Improving conver…
HadenSmith Mar 27, 2026
8ae4726
Made edits to the JOSS paper.
HadenSmith Mar 27, 2026
c5332f5
Minor edits to paper.
HadenSmith Mar 27, 2026
5ad1c11
Removing to-do list and cleaning up commits.
HadenSmith Mar 28, 2026
fec21ca
Restore source files after history cleanup.
HadenSmith Mar 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
changelog:
categories:
- title: New Features
labels: [enhancement, feature]
- title: Bug Fixes
labels: [bug, fix]
- title: Documentation
labels: [documentation]
- title: Other Changes
labels: ["*"]
37 changes: 37 additions & 0 deletions .github/workflows/NuGetPublish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Publish to NuGet.org

on:
release:
types: [published]

jobs:
publish:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-dotnet@v4
with:
dotnet-version: |
8.0.x
9.0.x
10.0.x
- name: Extract version from tag
id: version
shell: bash
run: echo "VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_OUTPUT

- name: Build
run: dotnet build Numerics/Numerics.csproj -c Release -p:Version=${{ steps.version.outputs.VERSION }}

- name: Test (all frameworks)
run: dotnet test -c Release --no-build

- name: Pack
run: dotnet pack Numerics/Numerics.csproj -c Release --no-build -p:Version=${{ steps.version.outputs.VERSION }}

- name: Push to NuGet.org
run: dotnet nuget push "Numerics/bin/Release/RMC.Numerics.${{ steps.version.outputs.VERSION }}.nupkg" --api-key ${{ secrets.NUGET_ORG_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -370,3 +370,4 @@ MigrationBackup/

#Numerics Specific
/TestResults
/.claude/settings.local.json
45 changes: 45 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
type: software
title: "Numerics"
version: "2.0.0"
date-released: "2026-03-08"
license: BSD-3-Clause
repository-code: "https://github.com/USACE-RMC/Numerics"
url: "https://github.com/USACE-RMC/Numerics"
abstract: >-
Numerics is a free and open-source .NET library providing numerical methods,
probability distributions, statistical analysis, and Bayesian inference tools
for quantitative risk assessment in water resources engineering.
keywords:
- statistics
- probability distributions
- MCMC
- hydrology
- flood frequency analysis
- copulas
- L-moments
- optimization
- .NET
- C#
authors:
- family-names: "Smith"
given-names: "C. Haden"
email: "cole.h.smith@usace.army.mil"
affiliation: "U.S. Army Corps of Engineers, Risk Management Center"
orcid: "https://orcid.org/0000-0002-4651-9890"
- family-names: "Fields"
given-names: "Woodrow L."
affiliation: "U.S. Army Corps of Engineers, Risk Management Center"
- family-names: "Gonzalez"
given-names: "Julian"
affiliation: "U.S. Army Corps of Engineers, Risk Management Center"
- family-names: "Niblett"
given-names: "Sadie"
affiliation: "U.S. Army Corps of Engineers, Risk Management Center"
- family-names: "Beam"
given-names: "Brennan"
affiliation: "U.S. Army Corps of Engineers, Hydrologic Engineering Center"
- family-names: "Skahill"
given-names: "Brian"
affiliation: "Fariborz Maseeh Department of Mathematics and Statistics, Portland State University"
13 changes: 13 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Code of Conduct

This project follows the [Contributor Covenant Code of Conduct v2.1](https://www.contributor-covenant.org/version/2/1/code_of_conduct/).

Please read the full text at the link above. In summary, we are committed to providing a welcoming and inclusive environment for everyone. Be respectful, constructive, and professional in all interactions.

## Reporting

If you experience or witness unacceptable behavior, please contact the project maintainers at cole.h.smith@usace.army.mil.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 2.1.
63 changes: 63 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Contributing to Numerics

Thank you for your interest in contributing to Numerics! We welcome bug reports, feature requests, validation results, and other feedback from the community.

## Review Capacity

Numerics is maintained by a small team within the U.S. Army Corps of Engineers Risk Management Center (USACE-RMC). **Our capacity to review external pull requests is very limited.** We prioritize issues and bug reports, which are always welcome and will be reviewed as resources permit.

If you plan to submit a pull request, please open an issue first to discuss your proposed change. This helps avoid duplicated effort and ensures your contribution aligns with the project's direction.

## How to Contribute

### Report a Bug

If you find a bug, please [open an issue](../../issues/new) and include:

- Steps to reproduce the problem
- Input data and configuration (if applicable)
- Expected behavior vs. actual behavior
- Software version and operating system
- Any relevant error messages or screenshots

### Request a Feature

Feature requests are welcome. Please [open an issue](../../issues/new) describing:

- The use case or problem you are trying to solve
- How you envision the feature working
- Any references to statistical methods or published literature

### Report Validation Results

Given the life-safety applications of this software, independent validation is especially valuable. If you have compared Numerics results against other software (e.g., R packages, published tables, or analytical solutions), we would appreciate hearing about it through an issue.

### Submit a Pull Request

Pull requests may take several weeks or longer to review. Before submitting code:

1. **Open an issue first** to discuss the proposed change
2. **Follow the coding standards**, including XML documentation on all public types and members
3. **Include unit tests** that validate against known results (R, SciPy, Mathematica, or published tables)
4. **Use MSTest** (`[TestClass]`, `[TestMethod]`) as the testing framework
5. **Ensure a clean build** with zero errors and zero warnings

## Developer Certificate of Origin

By submitting a pull request, you certify under the [Developer Certificate of Origin (DCO) Version 1.1](https://developercertificate.org/) that you have the right to submit the work under the license associated with this project and that you agree to the DCO.

All contributions will be released under the same license as the project (see [LICENSE](LICENSE)).

## Federal Government Contributors

U.S. Federal law prevents the government from accepting gratuitous services unless certain conditions are met. By submitting a pull request, you acknowledge that your services are offered without expectation of payment and that you expressly waive any future pay claims against the U.S. Federal government related to your contribution.

If you are a U.S. Federal government employee and use a `*.mil` or `*.gov` email address, your contribution is understood to have been created in whole or in part as part of your official duties and is not subject to domestic copyright protection under 17 USC 105.

## Security

If you discover a security vulnerability, please do **not** open a public issue. Instead, contact the RMC team directly through official USACE-RMC channels.

## License

See [LICENSE](LICENSE) for details. This software is provided by USACE-RMC under a BSD-style license with a no-endorsement clause.
4 changes: 2 additions & 2 deletions Numerics.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.9.34723.18
# Visual Studio Version 18
VisualStudioVersion = 18.2.11430.68 d18.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Numerics", "Numerics\Numerics.csproj", "{9C8B75DE-ABF2-42D3-96C7-18405AD16488}"
EndProject
Expand Down
2 changes: 1 addition & 1 deletion Numerics/Data/Interpolation/Bilinear.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public bool UseSmartSearch
{
_useSmartSearch = value;
X1LI.UseSmartSearch = value;
X1LI.UseSmartSearch = value;
X2LI.UseSmartSearch = value;
}
}

Expand Down
7 changes: 5 additions & 2 deletions Numerics/Data/Interpolation/CubicSpline.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

using System;
using System.Collections.Generic;

namespace Numerics.Data
{
/// <summary>
Expand Down Expand Up @@ -62,7 +65,7 @@ public class CubicSpline : Interpolater
{

/// <summary>
/// Construct new linear interpolation.
/// Construct new cubic spline interpolation.
/// </summary>
/// <param name="xValues">List of x-values.</param>
/// <param name="yValues">List of y-values.</param>
Expand All @@ -75,7 +78,7 @@ public CubicSpline(IList<double> xValues, IList<double> yValues, SortOrder sortO
/// <summary>
/// Stores the array of second derivatives.
/// </summary>
private double[] y2 = Array.Empty<double>();
private double[] y2 = null!;

/// <summary>
/// Auxiliary routine to set the second derivatives. If you make changes to the x- or y-values, then you need to call this routine afterwards.
Expand Down
2 changes: 1 addition & 1 deletion Numerics/Data/Interpolation/Linear.cs
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ public double Extrapolate(double x)

// Extrapolate
// Check for division by zero
if ((y2 - y1) == 0)
if ((x2 - x1) == 0)
{
y = y1;
}
Expand Down
8 changes: 3 additions & 5 deletions Numerics/Data/Interpolation/Support/Search.cs
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,7 @@ public static int Hunt(double xValue, OrderedPairedData orderedPairedData, int s
int XLO = start;
int XHI;
int XM;
var ASCND = default(bool);
var ASCND = orderedPairedData.OrderX == SortOrder.Ascending;
int INC;

// validate
Expand Down Expand Up @@ -816,7 +816,7 @@ public static int Hunt(double xValue, OrderedPairedData orderedPairedData, int s
XLO = start;

// Perform the hunt search algorithm
if (XLO <= 0 | XLO > N)
if (XLO <= 0 || XLO > N)
{
// The input guess is not useful.
// Go immediately to bisection.
Expand Down Expand Up @@ -849,7 +849,6 @@ public static int Hunt(double xValue, OrderedPairedData orderedPairedData, int s
else
{
// Hunt down
XHI = XLO;
XHI = XLO - 1;
while (X < orderedPairedData[XLO].X == ASCND)
{
Expand Down Expand Up @@ -965,7 +964,7 @@ public static int Hunt(double xValue, IList<Ordinate> ordinateData, int start =
XLO = start;

// Perform the hunt search algorithm
if (XLO <= 0 | XLO > N)
if (XLO <= 0 || XLO > N)
{
// The input guess is not useful.
// Go immediately to bisection.
Expand Down Expand Up @@ -998,7 +997,6 @@ public static int Hunt(double xValue, IList<Ordinate> ordinateData, int start =
else
{
// Hunt down
XHI = XLO;
XHI = XLO - 1;
while (X < ordinateData[XLO].X == ASCND)
{
Expand Down
Loading
Loading