Package | Description |
---|---|
cern.colt.matrix |
Matrix interfaces and factories; efficient and flexible dense and sparse
1, 2, 3 and d-dimensional matrices holding objects or primitive data types such
as int, double, etc; Templated, fixed sized (not dynamically
resizable); Also known as multi-dimensional arrays or Data Cubes.
|
cern.colt.matrix.impl |
Matrix implementations; You normally need not look at this package, because all concrete classes implement the abstract interfaces of
cern.colt.matrix , without subsetting or supersetting. |
cern.colt.matrix.objectalgo |
Object matrix algorithms such as print formatting, sorting, partitioning and statistics.
|
Modifier and Type | Method and Description |
---|---|
ObjectMatrix2D |
ObjectFactory2D.appendColumns(ObjectMatrix2D A,
ObjectMatrix2D B)
C = A||B; Constructs a new matrix which is the column-wise concatenation of two other matrices.
|
ObjectMatrix2D |
ObjectFactory2D.appendRows(ObjectMatrix2D A,
ObjectMatrix2D B)
C = A||B; Constructs a new matrix which is the row-wise concatenation of two other matrices.
|
ObjectMatrix2D |
ObjectMatrix2D.assign(Object value)
Sets all cells to the state specified by value.
|
ObjectMatrix2D |
ObjectMatrix2D.assign(Object[][] values)
Sets all cells to the state specified by values.
|
ObjectMatrix2D |
ObjectMatrix2D.assign(ObjectFunction function)
Assigns the result of a function to each cell; x[row,col] = function(x[row,col]).
|
ObjectMatrix2D |
ObjectMatrix2D.assign(ObjectMatrix2D other)
Replaces all cell values of the receiver with the values of another matrix.
|
ObjectMatrix2D |
ObjectMatrix2D.assign(ObjectMatrix2D y,
ObjectObjectFunction function)
Assigns the result of a function to each cell; x[row,col] = function(x[row,col],y[row,col]).
|
ObjectMatrix2D |
ObjectFactory2D.compose(ObjectMatrix2D[][] parts)
Constructs a block matrix made from the given parts.
|
ObjectMatrix2D |
ObjectFactory2D.composeDiagonal(ObjectMatrix2D A,
ObjectMatrix2D B)
Constructs a diagonal block matrix from the given parts (the direct sum of two matrices).
|
ObjectMatrix2D |
ObjectFactory2D.composeDiagonal(ObjectMatrix2D A,
ObjectMatrix2D B,
ObjectMatrix2D C)
Constructs a diagonal block matrix from the given parts.
|
ObjectMatrix2D |
ObjectMatrix2D.copy()
Constructs and returns a deep copy of the receiver.
|
ObjectMatrix2D |
ObjectFactory2D.diagonal(ObjectMatrix1D vector)
Constructs a new diagonal matrix whose diagonal elements are the elements of vector.
|
protected ObjectMatrix2D |
ObjectMatrix2D.getContent()
Returns the content of this matrix if it is a wrapper; or this otherwise.
|
ObjectMatrix2D |
ObjectMatrix2D.like()
Construct and returns a new empty matrix of the same dynamic type as the receiver, having the same number of rows and columns.
|
abstract ObjectMatrix2D |
ObjectMatrix2D.like(int rows,
int columns)
Construct and returns a new empty matrix of the same dynamic type as the receiver, having the specified number of rows and columns.
|
abstract ObjectMatrix2D |
ObjectMatrix1D.like2D(int rows,
int columns)
Construct and returns a new 2-d matrix of the corresponding dynamic type, entirelly independent of the receiver.
|
protected abstract ObjectMatrix2D |
ObjectMatrix3D.like2D(int rows,
int columns,
int rowZero,
int columnZero,
int rowStride,
int columnStride)
Construct and returns a new 2-d matrix of the corresponding dynamic type, sharing the same cells.
|
ObjectMatrix2D |
ObjectFactory2D.make(int rows,
int columns)
Constructs a matrix with the given shape, each cell initialized with zero.
|
ObjectMatrix2D |
ObjectFactory2D.make(int rows,
int columns,
Object initialValue)
Constructs a matrix with the given shape, each cell initialized with the given value.
|
ObjectMatrix2D |
ObjectFactory2D.make(Object[][] values)
Constructs a matrix with the given cell values.
|
ObjectMatrix2D |
ObjectFactory2D.make(Object[] values,
int rows)
Construct a matrix from a one-dimensional column-major packed array, ala Fortran.
|
ObjectMatrix2D |
ObjectFactory2D.repeat(ObjectMatrix2D A,
int rowRepeat,
int columnRepeat)
C = A||A||..||A; Constructs a new matrix which is duplicated both along the row and column dimension.
|
protected ObjectMatrix2D |
ObjectMatrix2D.view()
Constructs and returns a new view equal to the receiver.
|
ObjectMatrix2D |
ObjectMatrix3D.viewColumn(int column)
Constructs and returns a new 2-dimensional slice view representing the slices and rows of the given column.
|
ObjectMatrix2D |
ObjectMatrix2D.viewColumnFlip()
Constructs and returns a new flip view along the column axis.
|
ObjectMatrix2D |
ObjectMatrix2D.viewDice()
Constructs and returns a new dice (transposition) view; Swaps axes; example: 3 x 4 matrix --> 4 x 3 matrix.
|
ObjectMatrix2D |
ObjectMatrix2D.viewPart(int row,
int column,
int height,
int width)
Constructs and returns a new sub-range view that is a height x width sub matrix starting at [row,column].
|
ObjectMatrix2D |
ObjectMatrix3D.viewRow(int row)
Constructs and returns a new 2-dimensional slice view representing the slices and columns of the given row.
|
ObjectMatrix2D |
ObjectMatrix2D.viewRowFlip()
Constructs and returns a new flip view along the row axis.
|
ObjectMatrix2D |
ObjectMatrix2D.viewSelection(int[] rowIndexes,
int[] columnIndexes)
Constructs and returns a new selection view that is a matrix holding the indicated cells.
|
ObjectMatrix2D |
ObjectMatrix2D.viewSelection(ObjectMatrix1DProcedure condition)
Constructs and returns a new selection view that is a matrix holding all rows matching the given condition.
|
protected abstract ObjectMatrix2D |
ObjectMatrix2D.viewSelectionLike(int[] rowOffsets,
int[] columnOffsets)
Construct and returns a new selection view.
|
ObjectMatrix2D |
ObjectMatrix3D.viewSlice(int slice)
Constructs and returns a new 2-dimensional slice view representing the rows and columns of the given slice.
|
ObjectMatrix2D |
ObjectMatrix2D.viewSorted(int column)
Sorts the matrix rows into ascending order, according to the natural ordering of the matrix values in the given column.
|
ObjectMatrix2D |
ObjectMatrix2D.viewStrides(int rowStride,
int columnStride)
Constructs and returns a new stride view which is a sub matrix consisting of every i-th cell.
|
Modifier and Type | Method and Description |
---|---|
Object |
ObjectMatrix2D.aggregate(ObjectMatrix2D other,
ObjectObjectFunction aggr,
ObjectObjectFunction f)
Applies a function to each corresponding cell of two matrices and aggregates the results.
|
ObjectMatrix2D |
ObjectFactory2D.appendColumns(ObjectMatrix2D A,
ObjectMatrix2D B)
C = A||B; Constructs a new matrix which is the column-wise concatenation of two other matrices.
|
ObjectMatrix2D |
ObjectFactory2D.appendRows(ObjectMatrix2D A,
ObjectMatrix2D B)
C = A||B; Constructs a new matrix which is the row-wise concatenation of two other matrices.
|
boolean |
ObjectMatrix2DProcedure.apply(ObjectMatrix2D element)
Applies a procedure to an argument.
|
ObjectMatrix2D |
ObjectMatrix2D.assign(ObjectMatrix2D other)
Replaces all cell values of the receiver with the values of another matrix.
|
ObjectMatrix2D |
ObjectMatrix2D.assign(ObjectMatrix2D y,
ObjectObjectFunction function)
Assigns the result of a function to each cell; x[row,col] = function(x[row,col],y[row,col]).
|
protected static void |
ObjectFactory2D.checkRectangularShape(ObjectMatrix2D[][] array)
Checks whether the given array is rectangular, that is, whether all rows have the same number of columns.
|
ObjectMatrix2D |
ObjectFactory2D.compose(ObjectMatrix2D[][] parts)
Constructs a block matrix made from the given parts.
|
ObjectMatrix2D |
ObjectFactory2D.composeDiagonal(ObjectMatrix2D A,
ObjectMatrix2D B)
Constructs a diagonal block matrix from the given parts (the direct sum of two matrices).
|
ObjectMatrix2D |
ObjectFactory2D.composeDiagonal(ObjectMatrix2D A,
ObjectMatrix2D B,
ObjectMatrix2D C)
Constructs a diagonal block matrix from the given parts.
|
void |
ObjectFactory2D.decompose(ObjectMatrix2D[][] parts,
ObjectMatrix2D matrix)
Splits a block matrix into its constituent blocks; Copies blocks of a matrix into the given parts.
|
void |
ObjectFactory2D.decompose(ObjectMatrix2D[][] parts,
ObjectMatrix2D matrix)
Splits a block matrix into its constituent blocks; Copies blocks of a matrix into the given parts.
|
ObjectMatrix1D |
ObjectFactory2D.diagonal(ObjectMatrix2D A)
Constructs a new vector consisting of the diagonal elements of A.
|
protected boolean |
ObjectMatrix2D.haveSharedCells(ObjectMatrix2D other)
Returns true if both matrices share at least one identical cell.
|
protected boolean |
ObjectMatrix2D.haveSharedCellsRaw(ObjectMatrix2D other)
Returns true if both matrices share at least one identical cell.
|
ObjectMatrix2D |
ObjectFactory2D.repeat(ObjectMatrix2D A,
int rowRepeat,
int columnRepeat)
C = A||A||..||A; Constructs a new matrix which is duplicated both along the row and column dimension.
|
Modifier and Type | Class and Description |
---|---|
class |
DenseObjectMatrix2D
Dense 2-d matrix holding Object elements.
|
class |
SparseObjectMatrix2D
Sparse hashed 2-d matrix holding Object elements.
|
Modifier and Type | Method and Description |
---|---|
ObjectMatrix2D |
DenseObjectMatrix2D.assign(Object[][] values)
Sets all cells to the state specified by values.
|
ObjectMatrix2D |
DenseObjectMatrix2D.assign(ObjectFunction function)
Assigns the result of a function to each cell; x[row,col] = function(x[row,col]).
|
ObjectMatrix2D |
DenseObjectMatrix2D.assign(ObjectMatrix2D source)
Replaces all cell values of the receiver with the values of another matrix.
|
ObjectMatrix2D |
DenseObjectMatrix2D.assign(ObjectMatrix2D y,
ObjectObjectFunction function)
Assigns the result of a function to each cell; x[row,col] = function(x[row,col],y[row,col]).
|
ObjectMatrix2D |
SparseObjectMatrix2D.like(int rows,
int columns)
Construct and returns a new empty matrix of the same dynamic type as the receiver, having the specified number of rows and columns.
|
ObjectMatrix2D |
DenseObjectMatrix2D.like(int rows,
int columns)
Construct and returns a new empty matrix of the same dynamic type as the receiver, having the specified number of rows and columns.
|
ObjectMatrix2D |
SparseObjectMatrix1D.like2D(int rows,
int columns)
Construct and returns a new 2-d matrix of the corresponding dynamic type, entirelly independent of the receiver.
|
ObjectMatrix2D |
DenseObjectMatrix1D.like2D(int rows,
int columns)
Construct and returns a new 2-d matrix of the corresponding dynamic type, entirelly independent of the receiver.
|
protected ObjectMatrix2D |
SparseObjectMatrix3D.like2D(int rows,
int columns,
int rowZero,
int columnZero,
int rowStride,
int columnStride)
Construct and returns a new 2-d matrix of the corresponding dynamic type, sharing the same cells.
|
protected ObjectMatrix2D |
DenseObjectMatrix3D.like2D(int rows,
int columns,
int rowZero,
int columnZero,
int rowStride,
int columnStride)
Construct and returns a new 2-d matrix of the corresponding dynamic type, sharing the same cells.
|
protected ObjectMatrix2D |
SparseObjectMatrix2D.viewSelectionLike(int[] rowOffsets,
int[] columnOffsets)
Construct and returns a new selection view.
|
protected ObjectMatrix2D |
DenseObjectMatrix2D.viewSelectionLike(int[] rowOffsets,
int[] columnOffsets)
Construct and returns a new selection view.
|
Modifier and Type | Method and Description |
---|---|
ObjectMatrix2D |
DenseObjectMatrix2D.assign(ObjectMatrix2D source)
Replaces all cell values of the receiver with the values of another matrix.
|
ObjectMatrix2D |
DenseObjectMatrix2D.assign(ObjectMatrix2D y,
ObjectObjectFunction function)
Assigns the result of a function to each cell; x[row,col] = function(x[row,col],y[row,col]).
|
protected boolean |
SparseObjectMatrix2D.haveSharedCellsRaw(ObjectMatrix2D other)
Returns true if both matrices share common cells.
|
protected boolean |
DenseObjectMatrix2D.haveSharedCellsRaw(ObjectMatrix2D other)
Returns true if both matrices share common cells.
|
Modifier and Type | Method and Description |
---|---|
static ObjectMatrix2D |
Partitioning.partition(ObjectMatrix2D matrix,
int column,
Object[] splitters,
int[] splitIndexes)
Same as
Partitioning.partition(int[],int,int,int[],int,int,int[])
except that it synchronously partitions the rows of the given matrix by the values of the given matrix column;
This is essentially the same as partitioning a list of composite objects by some instance variable;
In other words, two entire rows of the matrix are swapped, whenever two column values indicate so. |
ObjectMatrix2D |
Sorting.sort(ObjectMatrix2D matrix,
int column)
Sorts the matrix rows into ascending order, according to the natural ordering of the matrix values in the given column.
|
ObjectMatrix2D |
Sorting.sort(ObjectMatrix2D matrix,
ObjectMatrix1DComparator c)
Sorts the matrix rows according to the order induced by the specified comparator.
|
Modifier and Type | Method and Description |
---|---|
int |
ObjectMatrix2DComparator.compare(ObjectMatrix2D o1,
ObjectMatrix2D o2)
Compares its two arguments for order.
|
protected String[][] |
Formatter.format(ObjectMatrix2D matrix)
Returns a string representations of all cells; no alignment considered.
|
static void |
Partitioning.partition(ObjectMatrix2D matrix,
int[] rowIndexes,
int rowFrom,
int rowTo,
int column,
Object[] splitters,
int splitFrom,
int splitTo,
int[] splitIndexes)
Same as
Partitioning.partition(int[],int,int,int[],int,int,int[])
except that it synchronously partitions the rows of the given matrix by the values of the given matrix column;
This is essentially the same as partitioning a list of composite objects by some instance variable;
In other words, two entire rows of the matrix are swapped, whenever two column values indicate so. |
static ObjectMatrix2D |
Partitioning.partition(ObjectMatrix2D matrix,
int column,
Object[] splitters,
int[] splitIndexes)
Same as
Partitioning.partition(int[],int,int,int[],int,int,int[])
except that it synchronously partitions the rows of the given matrix by the values of the given matrix column;
This is essentially the same as partitioning a list of composite objects by some instance variable;
In other words, two entire rows of the matrix are swapped, whenever two column values indicate so. |
ObjectMatrix2D |
Sorting.sort(ObjectMatrix2D matrix,
int column)
Sorts the matrix rows into ascending order, according to the natural ordering of the matrix values in the given column.
|
ObjectMatrix2D |
Sorting.sort(ObjectMatrix2D matrix,
ObjectMatrix1DComparator c)
Sorts the matrix rows according to the order induced by the specified comparator.
|
String |
Formatter.toSourceCode(ObjectMatrix2D matrix)
Returns a string s such that Object[] m = s is a legal Java statement.
|
String |
Formatter.toString(ObjectMatrix2D matrix)
Returns a string representation of the given matrix.
|
String |
Formatter.toTitleString(ObjectMatrix2D matrix,
String[] rowNames,
String[] columnNames,
String rowAxisName,
String columnAxisName,
String title)
Returns a string representation of the given matrix with axis as well as rows and columns labeled.
|
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.