⬆️ 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:
Eric Coissac
2026-04-07 08:36:50 +02:00
parent 670edc1958
commit 8c7017a99d
392 changed files with 18875 additions and 141 deletions
+23
View File
@@ -0,0 +1,23 @@
# `obiutils` Package: Semantic Overview
This Go package (`obiutils`) provides generic utilities for numerical and matrix operations, leveraging generics (Go 1.18+). It defines foundational types and helper functions for working with multidimensional data structures.
- **Type Interfaces**
- `Integer`: Constraint covering signed integer types (`int`, `int8``int64`).
- `Float`: Constraint for floating-point types (`float32`, `float64`).
- `Numeric`: Union of both, enabling generic numeric functions.
- **Data Structures**
- `Vector[T]`: A slice-based vector (`[]T`).
- `Matrix[T]`: A row-major representation of a 2D matrix (`[][]T`), backed by contiguous memory for performance.
- **Core Functions**
- `Make2DArray[T]`: Allocates a zero-initialized, contiguous-row-major matrix of arbitrary type `T`.
- `Make2DNumericArray[T]`: Same as above, but restricted to numeric types; optionally pre-fills with zeros if `zeroed=true`.
- **Matrix Methods**
- `.Column(i int)`: Extracts column `i` as a slice (not row-wise access).
- `.Rows(i ...int)`: Returns a new matrix containing only the specified row indices.
- `.Dim() (int, int)`: Returns `(rows, cols)` safely handling `nil` or empty matrices.
The design prioritizes memory efficiency (via contiguous backing arrays), type safety through generics, and ergonomic access patterns for linear algebra-like workflows.