public class SparseSquareMatrix extends Object implements Serializable
Constructor and Description |
---|
SparseSquareMatrix(int N)
initialize an N-by-N matrix of all 0s
|
Modifier and Type | Method and Description |
---|---|
double |
get(int i,
int j)
access a value at i,j
|
int |
nnz()
return the number of nonzero entries (not the most efficient implementation)
|
SparseSquareMatrix |
plus(SparseSquareMatrix B)
return C = A + B
|
void |
put(int i,
int j,
double value)
set A[i][j] = value
|
SparseVector |
times(SparseVector x) |
String |
toString() |
public SparseSquareMatrix(int N)
N
- - sizepublic void put(int i, int j, double value)
i
- j
- value
- public double get(int i, int j)
i
- j
- public int nnz()
public SparseVector times(SparseVector x)
x
- public SparseSquareMatrix plus(SparseSquareMatrix B)
B
- Copyright © 2000–2016 BioJava. All rights reserved.