本文整理匯總了Java中org.simmetrics.metrics.functions.MatchMismatch類的典型用法代碼示例。如果您正苦於以下問題:Java MatchMismatch類的具體用法?Java MatchMismatch怎麽用?Java MatchMismatch使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
MatchMismatch類屬於org.simmetrics.metrics.functions包,在下文中一共展示了MatchMismatch類的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getSmithWatermanFunction
import org.simmetrics.metrics.functions.MatchMismatch; //導入依賴的package包/類
private org.simmetrics.metrics.SmithWaterman getSmithWatermanFunction(final Value... values) throws ExpressionEvaluationException {
if (smithWaterman == null) {
if (values.length == 7) {
for(final Expression expression : getArgs()) {
if(!(expression instanceof Constant)) {
throw new ExpressionEvaluationException("Parameters 2 through 7 must be constant expressions");
}
}
final float gapA = assertNumericLiteral(values[2]).floatValue();
final float gapB = assertNumericLiteral(values[3]).floatValue();
final float subPenaltyA = assertNumericLiteral(values[4]).floatValue();
final float subPenaltyB = assertNumericLiteral(values[5]).floatValue();
final int windowSize = assertNumericLiteral(values[6]).intValue();
smithWaterman = new org.simmetrics.metrics.SmithWaterman(new AffineGap(gapA, gapB), new MatchMismatch(subPenaltyA, subPenaltyB), windowSize);
} else {
smithWaterman = new org.simmetrics.metrics.SmithWaterman();
}
}
return smithWaterman;
}
示例2: getSmithWatermanGotohFunction
import org.simmetrics.metrics.functions.MatchMismatch; //導入依賴的package包/類
private org.simmetrics.metrics.SmithWatermanGotoh getSmithWatermanGotohFunction(final Value... values) throws ExpressionEvaluationException {
if (smithWatermanGotoh == null) {
if (values.length == 5) {
for (final Expression expression : getArgs()) {
//FIXME check only 2 through 7 not all params
if (!(expression instanceof Constant)) {
throw new ExpressionEvaluationException("Parameters 2 through 7 must be constant expressions");
}
}
final float gapValue = assertNumericLiteral(values[2]).floatValue();
final float matchPenalty = assertNumericLiteral(values[3]).floatValue();
final float mismatchPenalty = assertNumericLiteral(values[4]).floatValue();
smithWatermanGotoh = new org.simmetrics.metrics.SmithWatermanGotoh(gapValue, new MatchMismatch(matchPenalty, mismatchPenalty));
} else {
smithWatermanGotoh = new org.simmetrics.metrics.SmithWatermanGotoh();
}
}
return smithWatermanGotoh;
}
示例3: getNeedlemanWunchFunction
import org.simmetrics.metrics.functions.MatchMismatch; //導入依賴的package包/類
private org.simmetrics.metrics.NeedlemanWunch getNeedlemanWunchFunction(final Value... values) throws ExpressionEvaluationException {
if (needlemanWunch == null) {
if (values.length == 5) {
final float gapValue = assertNumericLiteral(values[2]).floatValue();
final float subPenaltyA = assertNumericLiteral(values[3]).floatValue();
final float subPenaltyB = assertNumericLiteral(values[4]).floatValue();
needlemanWunch = new org.simmetrics.metrics.NeedlemanWunch(gapValue, new MatchMismatch(subPenaltyA, subPenaltyB));
} else {
needlemanWunch = new org.simmetrics.metrics.NeedlemanWunch();
}
}
return needlemanWunch;
}
示例4: SmithWaterman
import org.simmetrics.metrics.functions.MatchMismatch; //導入依賴的package包/類
/**
* Constructs a new Smith Waterman metric. Uses an affine gap of
* <code>-5.0 - gapLength</code> a <code>-3.0</code> substitution penalty
* for mismatches, <code>5.0</code> for matches.
*
*/
public SmithWaterman() {
this(new AffineGap(-5.0f, -1.0f), new MatchMismatch(5.0f, -3.0f),
Integer.MAX_VALUE);
}