public final class ConstantGap extends Object implements Gap
This class is immutable and thread-safe.
Constructor and Description |
---|
ConstantGap(float gapValue)
Constructs a constant gap function that assigns a penalty of
gapValue to a gap. |
Modifier and Type | Method and Description |
---|---|
float |
max()
Returns the minimum value a gap can have.
|
float |
min()
Returns the maximum value a gap can have.
|
String |
toString() |
float |
value(int fromIndex,
int toIndex)
Returns the penalty for creating a gap from
fromIndex to
toIndex -1 . |
public ConstantGap(float gapValue)
gapValue
to a gap. .gapValue
- a non-positive constant gap valuepublic final float value(int fromIndex, int toIndex)
Gap
fromIndex
to
toIndex -1
. The value must be non-positive.public final float max()
Gap
public final float min()
Gap
Copyright © 2014–2018. All rights reserved.