Package org.jblas
Class Geometry
java.lang.Object
org.jblas.Geometry
General functions which are geometric in nature.
For example, computing all pairwise squared distances between all columns of a matrix.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic DoubleMatrix
Center a vector (subtract mean from all elements (in-place).static FloatMatrix
Center a vector (subtract mean from all elements (in-place).static DoubleMatrix
Center the columns of a matrix (in-place).static FloatMatrix
Center the columns of a matrix (in-place).static DoubleMatrix
Center the rows of a matrix (in-place).static FloatMatrix
Center the rows of a matrix (in-place).static DoubleMatrix
Normalize a vector (scale such that its Euclidean norm is 1) (in-place).static FloatMatrix
Normalize a vector (scale such that its Euclidean norm is 1) (in-place).static DoubleMatrix
Normalize the columns of a matrix (in-place).static FloatMatrix
Normalize the columns of a matrix (in-place).static DoubleMatrix
Normalize the rows of a matrix (in-place).static FloatMatrix
Normalize the rows of a matrix (in-place).static DoubleMatrix
Compute the pairwise squared distances between all columns of the two matrices.static FloatMatrix
Compute the pairwise squared distances between all columns of the two matrices.
-
Constructor Details
-
Geometry
public Geometry()
-
-
Method Details
-
pairwiseSquaredDistances
Compute the pairwise squared distances between all columns of the two matrices.
An efficient way to do this is to observe that (x-y)^2 = x^2 - 2xy - y^2 and to then properly carry out the computation with matrices.
-
center
Center a vector (subtract mean from all elements (in-place). -
centerRows
Center the rows of a matrix (in-place). -
centerColumns
Center the columns of a matrix (in-place). -
normalize
Normalize a vector (scale such that its Euclidean norm is 1) (in-place). -
normalizeRows
Normalize the rows of a matrix (in-place). -
normalizeColumns
Normalize the columns of a matrix (in-place). -
pairwiseSquaredDistances
Compute the pairwise squared distances between all columns of the two matrices.
An efficient way to do this is to observe that (x-y)^2 = x^2 - 2xy - y^2 and to then properly carry out the computation with matrices.
-
center
Center a vector (subtract mean from all elements (in-place). -
centerRows
Center the rows of a matrix (in-place). -
centerColumns
Center the columns of a matrix (in-place). -
normalize
Normalize a vector (scale such that its Euclidean norm is 1) (in-place). -
normalizeRows
Normalize the rows of a matrix (in-place). -
normalizeColumns
Normalize the columns of a matrix (in-place).
-