mirror of
https://github.com/metabarcoding/obitools4.git
synced 2026-04-30 03:50:39 +00:00
⬆️ version bump to v4.5
- Update obioptions.Version from "Release 4.4.29" to "/v/ Release v5" - Update version.txt from 4.29 → .30 (automated by Makefile)
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
# `obistats` Package — Semantic Overview
|
||||
|
||||
The `obistats` package provides lightweight, general-purpose numerical utilities in Go. It includes:
|
||||
|
||||
- **Basic arithmetic helpers**:
|
||||
- `maxint`, `minint`: return the maximum/minimum of two integers.
|
||||
- `sumint(xs []int) int`: computes the sum over a slice of integers.
|
||||
|
||||
- **Root-finding via bisection**:
|
||||
- `bisect(...)`: numerically finds a root of a real-valued function within `[low, high]`, using the classical bisection method. Returns `(root, success)`.
|
||||
- Requires `f(low)` and `f(high)` to have opposite signs; panics otherwise.
|
||||
|
||||
- **Boolean bisection**:
|
||||
- `bisectBool(...)`: locates the transition point where a boolean function flips (e.g., threshold detection). Returns adjacent points `(x1, x2)` straddling the change. Panics if `f(low) == f(high)`.
|
||||
|
||||
- **Series summation**:
|
||||
- `series(...)`: computes the infinite sum ∑ₙ₌₀^∞ f(n) by iterating until convergence (i.e., `y == yp` within floating-point precision).
|
||||
- *Note*: Fast but may suffer from rounding errors for slowly converging or oscillating series.
|
||||
|
||||
All functions are designed for performance and simplicity, with no external dependencies beyond `fmt` (for error messages). The package is a stripped-down copy of internal utilities, likely used in performance-critical or statistical computations.
|
||||
Reference in New Issue
Block a user