mitsuki31 / jmatrix

A lightweight Java library for basic introduction to matrix and linear algebra concepts.
https://mitsuki31.github.io/jmatrix/
Apache License 2.0
1 stars 0 forks source link

fix: Fix matrix row and column insertion boundaries #132

Closed mitsuki31 closed 2 months ago

mitsuki31 commented 2 months ago

Overview

This pull request addresses issues related to row and column insertion boundaries in the Matrix class, as well as correcting index checks for matrix operations. The changes ensure that rows and columns can be inserted correctly at the end of the matrix and that boundary conditions are handled appropriately, avoiding potential index out of bounds errors.

Changes Made

Row Insertion Correction

Column Insertion Correction

Boundary Check Adjustment

Impact

Functionality

These fixes ensure that the matrix operations for row and column insertions behave as expected, allowing elements to be appended to the end of the matrix. The corrected boundary checks prevent out-of-bounds errors and ensure robust matrix operations.

Backward Compatibility

The changes maintain backward compatibility with existing matrix operations, as they only correct boundary conditions and insertion indices without altering the fundamental behavior of the matrix methods.