Documentation API of the 'jhplot.bsom.Matrix' Java class
Matrix
jhplot.bsom

## Class Matrix

• Direct Known Subclasses:
UserData

`public class Matrixextends Object`
Matrix is a class for matrix objects with basic linear calculation methods.
• ### Constructor Summary

Constructors
Constructor and Description
`Matrix(int n)`
Construct a square matrix object.
`Matrix(int row, int col)`
Construct a rectangle matrix object.
• ### Method Summary

All Methods
Modifier and TypeMethod and Description
`Matrix``copy()`
Copy the matrix.
`Matrix``crossSqDistance(Matrix Y)`
Cross squared Euclidean distance Matrix: Z_{ij} = ||X_i - Y_j||^2
`Matrix``diagonal()`
If the matrix is a row or column vector, make a diagonal matrix from it.
`Matrix``dividedBy(Matrix Y)`
Matrix division: X\Y.
`Matrix``dividedBy(Matrix Y, int bw)`
Matrix division with bandwidth: X\Y.
`Matrix``eigenvalues(double eps, int lmax)`
Make a row vector including the eigenvalues of the matrix.
`Matrix``horizontalSum()`
Make a horizontal-summation vector.
`static Matrix``identity(int n)`
Make an identity matrix.
`Matrix``linearConv(double a, double b, Matrix Y)`
Linear conversion: a*X + b*Y.
`Matrix``mulipliedEntriesWith(Matrix Y)`
Multiply entries.
`Matrix``multipliedBy(double a)`
Scalar product: aX.
`Matrix``multipliedBy(Matrix Y)`
Matrix multiplication: X*Y.
`static Matrix``random(int row, int col)`
Same as random(row, col, 1).
`static Matrix``random(int row, int col, int seed)`
Make a standard Gaussian random Matrix.
`double``sumEntries()`
Summation of all entries.
`double``sumSqrEntries()`
Summation of squared entries.
`Matrix``transpose()`
Transpose: X'.
`void``updateDivideByRowVector(Matrix vec)`
X_{ij} = X_{ij}/v_{j}.
`void``updateExp()`
Update by exponential : exp(X_{ij})
`void``updateLinearConv(double a, double b, Matrix Y)`
Update by Linear conversion: X = a*X + b*Y.
`Matrix``verticalSum()`
Make a vertical-summation vector.
• ### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`
• ### Constructor Detail

• #### Matrix

`public Matrix(int n)`
Construct a square matrix object.
Parameters:
`n` - size
• #### Matrix

`public Matrix(int row,              int col)`
Construct a rectangle matrix object.
Parameters:
`row` - number of row
`col` - number of column
• ### Method Detail

• #### identity

`public static Matrix identity(int n)`
Make an identity matrix.
Parameters:
`n` - size
• #### random

`public static Matrix random(int row,                            int col,                            int seed)`
Make a standard Gaussian random Matrix.
Parameters:
`row` - number of row
`col` - number of column
`seed` - random seed
• #### random

`public static Matrix random(int row,                            int col)`
Same as random(row, col, 1).
• #### copy

`public Matrix copy()`
Copy the matrix.
• #### transpose

`public Matrix transpose()`
Transpose: X'.
• #### linearConv

`public Matrix linearConv(double a,                         double b,                         Matrix Y)`
Linear conversion: a*X + b*Y.
• #### updateLinearConv

`public void updateLinearConv(double a,                             double b,                             Matrix Y)`
Update by Linear conversion: X = a*X + b*Y.
• #### multipliedBy

`public Matrix multipliedBy(double a)`
Scalar product: aX.
• #### multipliedBy

`public Matrix multipliedBy(Matrix Y)`
Matrix multiplication: X*Y.
• #### dividedBy

`public Matrix dividedBy(Matrix Y)`
Matrix division: X\Y.
• #### dividedBy

`public Matrix dividedBy(Matrix Y,                        int bw)`
Matrix division with bandwidth: X\Y.
• #### crossSqDistance

`public Matrix crossSqDistance(Matrix Y)`
Cross squared Euclidean distance Matrix: Z_{ij} = ||X_i - Y_j||^2
• #### updateExp

`public void updateExp()`
Update by exponential : exp(X_{ij})
• #### horizontalSum

`public Matrix horizontalSum()`
Make a horizontal-summation vector.
• #### verticalSum

`public Matrix verticalSum()`
Make a vertical-summation vector.
• #### sumEntries

`public double sumEntries()`
Summation of all entries.
• #### sumSqrEntries

`public double sumSqrEntries()`
Summation of squared entries.
• #### mulipliedEntriesWith

`public Matrix mulipliedEntriesWith(Matrix Y)`
Multiply entries.
• #### updateDivideByRowVector

`public void updateDivideByRowVector(Matrix vec)`
X_{ij} = X_{ij}/v_{j}.
• #### diagonal

`public Matrix diagonal()`
If the matrix is a row or column vector, make a diagonal matrix from it. Otherwise extract its diagonal as a row vector.
• #### eigenvalues

`public Matrix eigenvalues(double eps,                          int lmax)`
Make a row vector including the eigenvalues of the matrix.
Parameters:
`eps` - allowable absolute value of off-diagonal entries

DMelt 1.2 © DataMelt by jWork.ORG

Matrix
jhplot.bsom

## Class Matrix

• Direct Known Subclasses:
UserData

`public class Matrixextends Object`
Matrix is a class for matrix objects with basic linear calculation methods.

Warning: You cannot see the full API documentation of this class since the access to the DatMelt documentation for third-party Java classes is denied. Guests can only view jhplot Java API. To view the complete description of this class and its methods, please request the full DataMelt membership.

If you are already a full member, please login to the DataMelt member area before visiting this documentation.