Skip to content

Commit ebd80dd

Browse files
committed
docs: Add more description and update class version
Added more description about matrix definition in the `Matrix` class docs. And also update its version.
1 parent e44ffe7 commit ebd80dd

File tree

1 file changed

+31
-8
lines changed

1 file changed

+31
-8
lines changed

src/main/java/com/mitsuki/jmatrix/Matrix.java

+31-8
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,14 @@
3737
* The <b>Matrix</b> class represents a two-dimensional (2D) array of {@code double}s.
3838
* An array with two dimensions (has rows and columns), also can be called a matrix.
3939
*
40-
* <p>It provides methods for creating, accessing and manipulating matrices,
40+
* <p><b>In mathematics, a matrix is a rectangular array or table of numbers, arranged in rows and columns,
41+
* and enclosed by brackets {@code ( )} or square brackets {@code [ ]}, which is used to represent a
42+
* mathematical object or a property of such an object</b>. Numbers arranged in a matrix are called matrix's
43+
* <b>elements</b> or <b>entries</b>. Matrices are usually symbolized using upper-case letters, while the corresponding
44+
* lower-case letters, with two subscript indices. Matrices are widely used in various fields, including
45+
* mathematics, computer science, physics, and engineering, to represent and manipulate data.
46+
*
47+
* <p>This class provides methods for creating, accessing and manipulating matrices,
4148
* as well as basic matrix operations such as:
4249
* <ul>
4350
* <li> {@linkplain #sum(Matrix) Addition}
@@ -48,15 +55,31 @@
4855
* <li> {@linkplain #trace() Trace}
4956
* </ul>
5057
*
51-
* <p>This also provides several matrix type checkers, such as:
58+
* <p>Also it provides several matrix type checkers, such as:
5259
* <ul>
53-
* <li> {@link #isSquare()}
54-
* <li> {@link #isDiagonal()}
55-
* <li> {@link #isLowerTriangular()}
56-
* <li> {@link #isUpperTriangular()}
57-
* <li> {@link #isSparse()}
60+
* <li> {@link #isSquare()} - Checks whether the matrix is a square matrix.
61+
* <li> {@link #isDiagonal()} - Checks whether the matrix is a diagonal matrix.
62+
* <li> {@link #isLowerTriangular()} - Checks whether the matrix is a lower triangular matrix.
63+
* <li> {@link #isUpperTriangular()} - Checks whether the matrix is a upper triangular matrix.
64+
* <li> {@link #isSparse()} - Checks whether the matrix is a sparse matrix.
5865
* </ul>
5966
*
67+
* <p>Moreover, there are also some helper methods, such as:
68+
* <ul>
69+
* <li> {@link #addRow(double[])} - Appends a given array to the last row in the matrix.
70+
* <li> {@link #addColumn(double[])} - Appends a given array to the last column in the matrix.
71+
* <li> {@link #insertRow(int, double[])} - Inserts a given array at the specified row index in the matrix.
72+
* <li> {@link #insertColumn(int, double[])} - Inserts a given array at the specified column index in the matrix.
73+
* <li> {@link #dropRow(int)} - Drops and removes specific row at the given row index.
74+
* <li> {@link #dropColumn(int)} - Drops and removes specific column at the given column index.
75+
* </ul>
76+
*
77+
* <blockquote>
78+
* <p><b>Note:</b> All the above helper methods are implemented in such a way that they help in transforming the
79+
* matrix entries efficiently. Additionally, they also allow the use of negative indices in arguments that depend
80+
* on the matrix index (all of them, except {@link #addRow} and {@link #addColumn} methods).
81+
* </blockquote>
82+
*
6083
* <p><b>Example:</b></p>
6184
*
6285
* <pre><code class="language-java">&nbsp;
@@ -93,7 +116,7 @@
93116
*
94117
* @author <a href="https://github.com/mitsuki31" target="_blank">
95118
* Ryuu Mitsuki</a>
96-
* @version 3.0, 8 February 2024
119+
* @version 3.2, 30 May 2024
97120
* @since 0.1.0
98121
* @license <a href="https://www.apache.org/licenses/LICENSE-2.0" target="_blank">
99122
* Apache License 2.0</a>

0 commit comments

Comments
 (0)