C
- Object to index ColumnsR
- Object to index Rowspublic class MatrixDouble<C,R> extends Object
Constructor and Description |
---|
MatrixDouble(Set<C> columResources,
Set<R> rowResources)
Create a matrix filled with null values considering the given indexes.
|
MatrixDouble(Set<C> columResources,
Set<R> rowResources,
Double initValue)
Create a matrix filled with null values considering the given indexes
|
Modifier and Type | Method and Description |
---|---|
Double |
getAverage()
Return the average of contained valued.
|
Double[] |
getColumn(C r)
Return the column associated to the given element
|
Set<C> |
getColumnElements() |
Double[][] |
getMatrix() |
Double |
getMax() |
Double |
getMaxColumn(C v) |
Double |
getMaxRow(R v) |
Double |
getMin()
Return the minimal value stored in the matrix
|
int |
getNbColumns() |
int |
getNbRows() |
Double[] |
getRow(R r)
Return the row associated to the given element
|
Set<R> |
getRowElements() |
Double |
getSum()
Compute the sum of the values contained in the matrix.
|
Double |
getValue(C colResource,
R rowResource) |
Double |
getValueCheckIndex(C colResource,
R rowResource) |
boolean |
isInColumnIndex(C r) |
boolean |
isInRowIndex(R r) |
boolean |
isSquare() |
void |
setValue(C colResource,
R rowResource,
Double value) |
String |
toString() |
public MatrixDouble(Set<C> columResources, Set<R> rowResources)
columResources
- the columnsrowResources
- the rowspublic Double[] getColumn(C r)
r
- the elementpublic Double[] getRow(R r)
r
- public Double getValueCheckIndex(C colResource, R rowResource)
colResource
- rowResource
- public Double getValue(C colResource, R rowResource) throws SLIB_Ex_Critic
colResource
- rowResource
- SLIB_Ex_Critic
public void setValue(C colResource, R rowResource, Double value)
colResource
- rowResource
- value
- public boolean isInRowIndex(R r)
r
- public boolean isInColumnIndex(C r)
r
- public int getNbColumns()
public int getNbRows()
public boolean isSquare()
public Double getMax()
public Double getMaxColumn(C v)
v
- IllegalArgumentException
- if the given value cannot be associated
to a columnpublic Double getMaxRow(R v)
v
- IllegalArgumentException
- if the given value cannot be associated
to a rowpublic Double getMin()
public Double getAverage()
public Double[][] getMatrix()
public Double getSum()
Copyright © 2014. All rights reserved.