public class ReplacementCosts extends Object
Modifier and Type | Field and Description |
---|---|
static double |
GAPDEFAULT |
static double |
MISMATCHDEFAULT |
static double |
SKIPDEFAULT |
Constructor and Description |
---|
ReplacementCosts(Alphabet alphabet,
boolean supportsGaps,
boolean supportsSkips)
Initializes an empty replacement score matrix with sensible defaults: The
diagonal is set to 0 (it costs nothing to replace a symbol by itself),
every other replacement is set to MISMATCHDEFAULT, gap costs are set to
GAPDEFAULT and skip costs to SKIPDEFAULT.
|
ReplacementCosts(Alphabet alphabet,
double[][] costMatrix) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
Alphabet |
getAlphabet() |
double[][] |
getCostMatrix()
Returns the cost matrix itself.
|
double |
getDeletionCost(String a) |
double[] |
getDeletionCosts()
Returns all deletion costs without any other costs.
|
double |
getInsertionCost(String b) |
double[] |
getInsertionCosts()
Returns all insertion costs without any other costs.
|
double |
getReplacementCost(String a,
String b) |
double[][] |
getReplacementCosts()
Returns the whole matrix of replacement costs without gap and skip costs.
|
double |
getSkipDeletionCost(String a) |
double[] |
getSkipDeletionCosts()
Returns all skip deletion costs without any other costs.
|
double |
getSkipInsertionCost(String b) |
double[] |
getSkipInsertionCosts()
Returns all skip insertion costs without any other costs.
|
int |
hashCode() |
boolean |
isGapAlignmentMatrix() |
boolean |
isLocalAlignmentMatrix() |
void |
setCostMatrix(double[][] costMatrix)
Sets the cost matrix itself.
|
void |
setDeletionCost(String a,
double cost) |
void |
setDeletionCosts(double[] delCosts)
Sets all deletion costs without any other costs.
|
void |
setInsertionCost(String b,
double cost) |
void |
setInsertionCosts(double[] insCosts)
Sets all insertion costs without any other costs.
|
void |
setReplacementCost(String a,
String b,
double cost) |
void |
setReplacementCosts(double[][] replacementCosts)
Sets the whole matrix of replacement costs without gap and skip costs.
|
void |
setSkipDeletionCost(String a,
double cost) |
void |
setSkipDeletionCosts(double[] delCosts)
Sets all skip deletion costs without any other costs.
|
void |
setSkipInsertionCost(String b,
double cost) |
void |
setSkipInsertionCosts(double[] insCosts)
Sets all skip insertion costs without any other costs.
|
public static final double MISMATCHDEFAULT
public static final double GAPDEFAULT
public static final double SKIPDEFAULT
public ReplacementCosts(Alphabet alphabet, boolean supportsGaps, boolean supportsSkips)
alphabet
- the alphabet that defines the indexing for this
replacement cost matrix.supportsGaps
- set to true if you also want to supply gap costs to
make this cost matrix usable for alignments.supportsSkips
- set to true if you also want to supply skip costs to
make this cost matrix usable for local alignments. Please note that
supportGaps has to be true in this case, too.public ReplacementCosts(Alphabet alphabet, double[][] costMatrix)
public boolean isGapAlignmentMatrix()
public boolean isLocalAlignmentMatrix()
public double[][] getCostMatrix()
public void setCostMatrix(double[][] costMatrix)
costMatrix
- the cost matrix itself.public double[][] getReplacementCosts()
public void setReplacementCosts(double[][] replacementCosts)
replacementCosts
- the whole matrix of replacement costs without gap
and skip costs.public double[] getDeletionCosts()
public void setDeletionCosts(double[] delCosts)
delCosts
- all deletion costs without any other costs.public double getDeletionCost(String a)
public void setDeletionCost(String a, double cost)
public double[] getInsertionCosts()
public void setInsertionCosts(double[] insCosts)
insCosts
- all insertion costs without any other costs.public double getInsertionCost(String b)
public void setInsertionCost(String b, double cost)
public double[] getSkipDeletionCosts()
public void setSkipDeletionCosts(double[] delCosts)
delCosts
- all skip deletion costs without any other costs.public double getSkipDeletionCost(String a)
public void setSkipDeletionCost(String a, double cost)
public double[] getSkipInsertionCosts()
public void setSkipInsertionCosts(double[] insCosts)
insCosts
- all skip insertion costs without any other costs.public double getSkipInsertionCost(String b)
public void setSkipInsertionCost(String b, double cost)
public Alphabet getAlphabet()
Copyright © 2014. All rights reserved.