⬆️ 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
+15
View File
@@ -0,0 +1,15 @@
# Semantic Description of `obiutils` Matrix Functionality
The `package obiutils` provides a generic, type-safe matrix abstraction in Go with core utility methods for construction and querying.
- **`Make2DArray[T]()`**: A generic constructor that initializes a 2D slice (matrix) of type `Matrix[T]`, with specified numbers of rows and columns. All elements are zero-initialized (e.g., `0` for integers, empty string for strings, default struct values).
- **`.Column(colIndex int)`**: Extracts and returns a single column (as `[]T`) from the matrix at the given 0-based index, preserving element order across rows.
- **`.Rows(indices ...int)`**: Returns a new matrix composed of only the specified row indices (0-based), supporting single-row, multi-row, or empty selections.
- **`.Dim() (rows, cols int)`**: Returns the dimensions of the matrix as `(number_of_rows, number_of_columns)`. Handles edge cases: `nil`, empty (`{}`), and jagged or zero-column matrices safely (e.g., `{ { } }` yields `(1, 0)`).
All functionality is implemented as methods on the `Matrix[T]` type (implicitly defined via slices of slices), leveraging Go generics for compile-time safety and runtime efficiency.
The package includes comprehensive unit tests validating correctness across types (`int`, `string`, custom structs) and boundary conditions.