Matrix.sparse()

 
Member of Matrix.
  1. static Matrix.sparse(int nrow,int ncol,int[] subi,int[] subj,float[] val)  
  2. static Matrix.sparse(int[] subi,int[] subj,float[] val)  
  3. static Matrix.sparse(int[] subi,int[] subj,float val)  
  4. static Matrix.sparse(int nrow,int ncol,int[] subi,int[] subj,float val)  
  5. static Matrix.sparse(int nrow,int ncol)  
  6. static Matrix.sparse(float[][] data)  
  7. static Matrix.sparse(Matrix[][] blocks)  
  8. static Matrix.sparse(Matrix v)  

static Matrix.sparse(nrow,ncol,subi,subj,val)

Construct a sparse matrix from triplet-format data.
nrow : int
Number of rows.
ncol : int
Number of columns.
subi : int[]
Row indexes of the non-zero elements.
subj : int[]
Column indexes of the non-zero elements.
val : float[]
Values of the non-zero elements
returns : Matrix
A sparse matrix object.

static Matrix.sparse(subi,subj,val)

Construct a sparse matrix from triplet-format data.
subi : int[]
Row indexes of the non-zero elements.
subj : int[]
Column indexes of the non-zero elements.
val : float[]
Values of the non-zero elements
returns : Matrix
A sparse matrix object.

static Matrix.sparse(subi,subj,val)

Construct a sparse matrix from triplet-format data.
subi : int[]
Row indexes of the non-zero elements.
subj : int[]
Column indexes of the non-zero elements.
val : float
A single value used for all non-zero elements
returns : Matrix
A sparse matrix object.

static Matrix.sparse(nrow,ncol,subi,subj,val)

Construct a sparse matrix from triplet-format data.
nrow : int
Number of rows.
ncol : int
Number of columns.
subi : int[]
Row indexes of the non-zero elements.
subj : int[]
Column indexes of the non-zero elements.
val : float
A single value used for all non-zero elements
returns : Matrix
A sparse matrix object.

static Matrix.sparse(nrow,ncol)

Construct an empty sparse matrix.
nrow : int
Number of rows in the matrix.
ncol : int
Number of columns in the matrix.
returns : Matrix
A sparse matrix object.

static Matrix.sparse(data)

Construct a sparse matrix from dense data
data : float[][]
A two-dimensional array of values.
returns : Matrix
A sparse matrix object.

static Matrix.sparse(blocks)

Construct a sparse matrix from blocks.
blocks : Matrix[][]
The matrix data. This is a two-dimensional array of Matrix objects; each entry must be a DenseMatrix, a SparseMatrix or None. In blocks, all elements in a row must have the same height, and all elements in a column must have the same width.
Entries that are None will be interpreted as a block of zeros whose height and width are deduced from the other elements in the same row and column. Any row that contains only None entries will have height 0, and any column that contains only None entries will have width 0.
returns : Matrix
A sparse matrix object.

static Matrix.sparse(v)

Construct a sparse matrix from another Matrix object.
v : Matrix
A matrix to construct a sparse matrix from.
returns : Matrix
A sparse matrix object.