C
- each element of the matrix corresponds to a pair of Compound
s of type Cpublic interface SubstitutionMatrix<C extends Compound>
Compound
in a sequence for another.Modifier and Type | Method and Description |
---|---|
Map<C,Short> |
getColumn(C column) |
CompoundSet<C> |
getCompoundSet()
Returns the
CompoundSet on which the matrix is defined. |
String |
getDescription()
Returns the description of this matrix.
|
short[][] |
getMatrix()
Returns entire matrix.
|
String |
getMatrixAsString()
Returns this matrix as a formatted String with
Compound labels along the axes. |
short |
getMaxValue()
Returns the maximum value in this matrix.
|
short |
getMinValue()
Returns the minimum value in this matrix.
|
String |
getName()
Returns the name (short description) of this matrix.
|
Map<C,Short> |
getRow(C row) |
short |
getValue(C from,
C to)
Returns value in matrix for conversion from first
Compound to the second. |
SubstitutionMatrix<C> |
normalizeMatrix(short scale)
Rescales the matrix so that to
getMaxValue() - getMinValue() = scale. |
void |
setDescription(String description)
Sets the description of this matrix.
|
void |
setName(String name)
Sets the name (short description) of this matrix.
|
CompoundSet<C> getCompoundSet()
CompoundSet
on which the matrix is defined.CompoundSet
on which the matrix is definedString getDescription()
short[][] getMatrix()
String getMatrixAsString()
Compound
labels along the axes.short getMaxValue()
short getMinValue()
short getValue(C from, C to)
Compound
to the second. If an argument does not
belong to the CompoundSet
, this could either throw an IllegalArgumentException
or it could
return getMinValue()
.from
- original Compound
to
- replacement Compound
Compound
to the secondIllegalArgumentException
- possibly, if an argument does not belong to the CompoundSet
SubstitutionMatrix<C> normalizeMatrix(short scale)
getMaxValue()
- getMinValue()
= scale.scale
- new normalization scale of this matrixIllegalArgumentException
- if scale < 1void setDescription(String description)
description
- new descriptionvoid setName(String name)
name
- new nameCopyright © 2000–2018 BioJava. All rights reserved.