org.biojava3.alignment.template
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 |
---|---|
CompoundSet<C> |
getCompoundSet()
Returns the
CompoundSet on which the matrix is defined. |
java.lang.String |
getDescription()
Returns the description of this matrix.
|
short[][] |
getMatrix()
Returns entire matrix.
|
java.lang.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.
|
java.lang.String |
getName()
Returns the name (short description) of this matrix.
|
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(java.lang.String description)
Sets the description of this matrix.
|
void |
setName(java.lang.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 definedjava.lang.String getDescription()
short[][] getMatrix()
java.lang.String getMatrixAsString()
Compound
labels along the axes.short getMaxValue()
short getMinValue()
java.lang.String getName()
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 secondjava.lang.IllegalArgumentException
- possibly, if an argument does not belong to the CompoundSet
SubstitutionMatrix<C> normalizeMatrix(short scale)
getMaxValue()
- getMinValue()
= scale.scale
- new normalization scale of this matrixjava.lang.IllegalArgumentException
- if scale < 1void setDescription(java.lang.String description)
description
- new descriptionvoid setName(java.lang.String name)
name
- new name