Uses of Class
cern.colt.matrix.ObjectMatrix2D
Packages that use ObjectMatrix2D
Package
Description
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.
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.Object matrix algorithms such as print formatting, sorting, partitioning and statistics.
-
Uses of ObjectMatrix2D in cern.colt.matrix
Methods in cern.colt.matrix that return ObjectMatrix2DModifier and TypeMethodDescriptionObjectFactory2D.appendColumns
(ObjectMatrix2D A, ObjectMatrix2D B) C = A||B; Constructs a new matrix which is the column-wise concatenation of two other matrices.ObjectFactory2D.appendRows
(ObjectMatrix2D A, ObjectMatrix2D B) C = A||B; Constructs a new matrix which is the row-wise concatenation of two other matrices.ObjectMatrix2D.assign
(ObjectFunction function) Assigns the result of a function to each cell; x[row,col] = function(x[row,col]).ObjectMatrix2D.assign
(ObjectMatrix2D other) Replaces all cell values of the receiver with the values of another matrix.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]).Sets all cells to the state specified by value.Sets all cells to the state specified by values.ObjectFactory2D.compose
(ObjectMatrix2D[][] parts) Constructs a block matrix made from the given parts.ObjectFactory2D.composeDiagonal
(ObjectMatrix2D A, ObjectMatrix2D B) Constructs a diagonal block matrix from the given parts (the direct sum of two matrices).ObjectFactory2D.composeDiagonal
(ObjectMatrix2D A, ObjectMatrix2D B, ObjectMatrix2D C) Constructs a diagonal block matrix from the given parts.ObjectMatrix2D.copy()
Constructs and returns a deep copy of the receiver.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.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.ObjectFactory2D.make
(int rows, int columns) Constructs a matrix with the given shape, each cell initialized with zero.Constructs a matrix with the given shape, each cell initialized with the given value.Constructs a matrix with the given cell values.Construct a matrix from a one-dimensional column-major packed array, ala Fortran.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.ObjectMatrix3D.viewColumn
(int column) Constructs and returns a new 2-dimensional slice view representing the slices and rows of the given column.ObjectMatrix2D.viewColumnFlip()
Constructs and returns a new flip view along the column axis.ObjectMatrix2D.viewDice()
Constructs and returns a new dice (transposition) view; Swaps axes; example: 3 x 4 matrix --> 4 x 3 matrix.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].ObjectMatrix3D.viewRow
(int row) Constructs and returns a new 2-dimensional slice view representing the slices and columns of the given row.ObjectMatrix2D.viewRowFlip()
Constructs and returns a new flip view along the row axis.ObjectMatrix2D.viewSelection
(int[] rowIndexes, int[] columnIndexes) Constructs and returns a new selection view that is a matrix holding the indicated cells.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.ObjectMatrix3D.viewSlice
(int slice) Constructs and returns a new 2-dimensional slice view representing the rows and columns of the given slice.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.viewStrides
(int rowStride, int columnStride) Constructs and returns a new stride view which is a sub matrix consisting of every i-th cell.Methods in cern.colt.matrix with parameters of type ObjectMatrix2DModifier and TypeMethodDescriptionObjectMatrix2D.aggregate
(ObjectMatrix2D other, ObjectObjectFunction aggr, ObjectObjectFunction f) Applies a function to each corresponding cell of two matrices and aggregates the results.ObjectFactory2D.appendColumns
(ObjectMatrix2D A, ObjectMatrix2D B) C = A||B; Constructs a new matrix which is the column-wise concatenation of two other matrices.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.assign
(ObjectMatrix2D other) Replaces all cell values of the receiver with the values of another matrix.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.ObjectFactory2D.compose
(ObjectMatrix2D[][] parts) Constructs a block matrix made from the given parts.ObjectFactory2D.composeDiagonal
(ObjectMatrix2D A, ObjectMatrix2D B) Constructs a diagonal block matrix from the given parts (the direct sum of two matrices).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.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.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. -
Uses of ObjectMatrix2D in cern.colt.matrix.impl
Subclasses of ObjectMatrix2D in cern.colt.matrix.implModifier and TypeClassDescriptionclass
Dense 2-d matrix holding Object elements.(package private) class
Selection view on dense 2-d matrices holding Object elements.(package private) class
Selection view on sparse 2-d matrices holding Object elements.class
Sparse hashed 2-d matrix holding Object elements.Methods in cern.colt.matrix.impl that return ObjectMatrix2DModifier and TypeMethodDescriptionDenseObjectMatrix2D.assign
(ObjectFunction function) Assigns the result of a function to each cell; x[row,col] = function(x[row,col]).DenseObjectMatrix2D.assign
(ObjectMatrix2D source) Replaces all cell values of the receiver with the values of another matrix.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]).Sets all cells to the state specified by values.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.SelectedDenseObjectMatrix2D.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.SelectedSparseObjectMatrix2D.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.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.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
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.SelectedDenseObjectMatrix1D.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
SelectedDenseObjectMatrix3D.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.SelectedSparseObjectMatrix1D.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
SelectedSparseObjectMatrix3D.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.SparseObjectMatrix1D.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.SelectedDenseObjectMatrix3D.viewColumn
(int column) Constructs and returns a new 2-dimensional slice view representing the slices and rows of the given column.SelectedSparseObjectMatrix3D.viewColumn
(int column) Constructs and returns a new 2-dimensional slice view representing the slices and rows of the given column.SelectedDenseObjectMatrix3D.viewRow
(int row) Constructs and returns a new 2-dimensional slice view representing the slices and columns of the given row.SelectedSparseObjectMatrix3D.viewRow
(int row) Constructs and returns a new 2-dimensional slice view representing the slices and columns of the given row.protected ObjectMatrix2D
DenseObjectMatrix2D.viewSelectionLike
(int[] rowOffsets, int[] columnOffsets) Construct and returns a new selection view.protected ObjectMatrix2D
SelectedDenseObjectMatrix2D.viewSelectionLike
(int[] rowOffsets, int[] columnOffsets) Construct and returns a new selection view.protected ObjectMatrix2D
SelectedSparseObjectMatrix2D.viewSelectionLike
(int[] rowOffsets, int[] columnOffsets) Construct and returns a new selection view.protected ObjectMatrix2D
SparseObjectMatrix2D.viewSelectionLike
(int[] rowOffsets, int[] columnOffsets) Construct and returns a new selection view.SelectedDenseObjectMatrix3D.viewSlice
(int slice) Constructs and returns a new 2-dimensional slice view representing the rows and columns of the given slice.SelectedSparseObjectMatrix3D.viewSlice
(int slice) Constructs and returns a new 2-dimensional slice view representing the rows and columns of the given slice.Methods in cern.colt.matrix.impl with parameters of type ObjectMatrix2DModifier and TypeMethodDescriptionDenseObjectMatrix2D.assign
(ObjectMatrix2D source) Replaces all cell values of the receiver with the values of another matrix.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
DenseObjectMatrix2D.haveSharedCellsRaw
(ObjectMatrix2D other) Returns true if both matrices share common cells.protected boolean
SelectedDenseObjectMatrix2D.haveSharedCellsRaw
(ObjectMatrix2D other) Returns true if both matrices share common cells.protected boolean
SelectedSparseObjectMatrix2D.haveSharedCellsRaw
(ObjectMatrix2D other) Returns true if both matrices share common cells.protected boolean
SparseObjectMatrix2D.haveSharedCellsRaw
(ObjectMatrix2D other) Returns true if both matrices share common cells. -
Uses of ObjectMatrix2D in cern.colt.matrix.objectalgo
Methods in cern.colt.matrix.objectalgo that return ObjectMatrix2DModifier and TypeMethodDescriptionstatic ObjectMatrix2D
Partitioning.partition
(ObjectMatrix2D matrix, int column, Object[] splitters, int[] splitIndexes) Same asPartitioning.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.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.Sorting.sort
(ObjectMatrix2D matrix, ObjectMatrix1DComparator c) Sorts the matrix rows according to the order induced by the specified comparator.Methods in cern.colt.matrix.objectalgo with parameters of type ObjectMatrix2DModifier and TypeMethodDescriptionint
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 asPartitioning.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 asPartitioning.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.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.Sorting.sort
(ObjectMatrix2D matrix, ObjectMatrix1DComparator c) Sorts the matrix rows according to the order induced by the specified comparator.Formatter.toSourceCode
(ObjectMatrix2D matrix) Returns a string s such that Object[] m = s is a legal Java statement.Formatter.toString
(ObjectMatrix2D matrix) Returns a string representation of the given matrix.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.private static int
Partitioning.xPartitionOld
(ObjectMatrix2D matrix, ObjectMatrix1D column, int from, int to, Object splitter) Same asinvalid reference
#partition(int[],int,int,int)
private static void
Partitioning.xPartitionOld
(ObjectMatrix2D matrix, ObjectMatrix1D column, int from, int to, Object[] splitters, int splitFrom, int splitTo, int[] splitIndexes) Same asinvalid reference
#partition(int[],int,int,int[],int,int,int[])