Expand description
§one-indexed-vec
Scientific computing library with 1-based indexing.
Built on the Vec1 type — a Vec-like container whose first element
lives at index 1, matching mathematical notation and the conventions
of Fortran, MATLAB, and Julia.
§Modules
| Module | Feature | Description |
|---|---|---|
vec1_core | always | The 1-based container and Index1 |
math | math | Sequences, series, Fourier analysis, orthogonal polynomials |
numerical | numerical | Basic numeric ops, integration, ODEs, root finding |
linear | linear | Matrices, decompositions, eigenvalues |
signal | signal | Filters, window functions, correlation |
stats | stats | Descriptive statistics, regression, distributions |
physics | physics | Quantum mechanics, thermodynamics, optics |
chemistry | chemistry | Atomic data, kinetics, thermodynamics |
§Quick start
use one_indexed_vec::{Vec1, vec1};
let v = vec1![1.0, 2.0, 3.0, 4.0, 5.0];
assert_eq!(v[1], 1.0);
assert_eq!(v.sum(), 15.0);
assert_eq!(v.mean(), 3.0);§Migration from 0.1.x
In 0.1.x the container was called VecIndexFromOne<T>. As of 0.2.0,
the canonical name is Vec1. The old name is retained as a deprecated
type alias for backward compatibility.
#![allow(deprecated)]
use one_indexed_vec::VecIndexFromOne;
let v = VecIndexFromOne::from(vec![1, 2, 3]);
assert_eq!(v[1], 1);Numeric algorithms that previously lived under one_indexed_vec::ops
are now available as methods on Vec1, grouped under the disciplinary
modules. The ops module is kept as an empty deprecated placeholder.
Re-exports§
Modules§
- chemistry
- Chemistry: atomic data, reaction kinetics, thermodynamics. Chemistry: atomic data, kinetics, thermodynamics.
- linear
- Linear algebra: matrices, LU/QR/Cholesky decompositions, eigenvalues, Gaussian elimination. Linear algebra: matrices, decompositions, eigenvalues, solvers.
- math
- Mathematical formulas and algorithms: sequences, series, Fourier analysis, orthogonal polynomials, FFT, combinatorics. Mathematical formulas and algorithms with 1-based indexing.
- numerical
- Numerical algorithms: integration, ODEs, root finding, optimization, window operations, finite differences, sliding statistics.
- ops
Deprecated - Deprecated re-export of numeric algorithms.
- physics
- Physics: quantum mechanics, thermodynamics, optics. Physical formulas and constants with 1-based indexing.
- signal
- Signal processing: FIR/IIR filters, window functions, convolution, correlation. Signal processing: filters, window functions, correlation.
- stats
- Statistics: descriptive statistics, correlation, regression, probability distributions. Statistics: descriptive statistics, correlation, regression, distributions.
- vec1_
core - Core container:
Vec1<T>, the 1-basedIndex1, and fundamental numeric operations (sum,mean,dot_product, …). Core container:Vec1<T>— a 1-basedVec.
Macros§
Type Aliases§
- VecIndex
From One Deprecated - Deprecated alias for
Vec1.