public class LongSparseMatrix extends Object
Constructor and Description |
---|
LongSparseMatrix(int numRows)
Create a new matrix with the given number of rows.
|
Modifier and Type | Method and Description |
---|---|
long |
get(int i,
int j)
Get a specific entry of the matrix.
|
int |
getNumRows()
Get the number of rows in the matrix.
|
void |
initialize()
Create a empty matrix with all values set to 0.0
|
void |
set(int i,
int j,
long v)
Set a specific entry of the matrix.
|
public LongSparseMatrix(int numRows)
numRows
- the number of rows.public void initialize()
public int getNumRows()
public long get(int i, int j)
i
- the rowj
- the columnpublic void set(int i, int j, long v)
i
- the rowj
- the columnv
- the value of the entryCopyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.