Closed mitsuki31 closed 5 months ago
There's a bad logic inside the body
insertRow
method on row index checker.It should be like this:
- } else if (row < 0 || row > mRows) { // Check for the index is out of bounds + } else if (row < 0 || row >= mRows) { // Check for the index is out of bounds
Where the given
row
must be lower than (and not equals) tomRows
(the total rows of the matrix).
This issue was moved to #110.
Overview
This pull request introduces several enhancements and improvements to the
Matrix
class, focusing on documentation updates, refactoring, and the addition of methods for swapping specified rows and columns within the matrix.Notable Changes
Feature Addition: Two sets of methods have been introduced to facilitate the swapping of specified rows and columns within the matrix. These methods optimize performance by either directly swapping column elements relying on arithmetic operations or utilizing
System.arraycopy
for row swaps.Documentation Enhancement: Detailed descriptions have been added to clarify the matrix definition in the
Matrix
class documentation. Additionally, the class version has been updated.Refactoring: New taglets, namely
apiNote
andimplNote
, have been incorporated. Furthermore, adjustments have been made to the configuration of themaven-compiler-plugin
dependency to resolve compatibility issues with version 3.13.0.Description
Features Addition
System.arraycopy
have been introduced. This approach not only improves performance but also facilitates negative indexing for specifying rows, allowing for greater flexibility in matrix manipulation.Documentation Enhancement
Matrix
class documentation now provides a more comprehensive explanation of the matrix definition, aiding developers in better understanding its functionalities and usage.Refactoring
apiNote
andimplNote
) have been integrated into the codebase, enriching the documentation with additional context and implementation notes.maven-compiler-plugin
version 3.13.0,<compilerVersion>
has been removed from the plugin configuration, ensuring smooth integration with the latest dependency version.Summary
This pull request enhances the
Matrix
class by focusing on refactoring code for better maintainability, and introducing efficient methods for swapping specified rows and columns within the matrix. These changes aim to streamline development processes, optimize performance, and enrich the overall user experience when working with matrices in the application.