public final class LinearGap extends Object implements Gap
This class is immutable and thread-safe.
| Constructor and Description |
|---|
LinearGap(float gapValue)
Constructs a linear gap function that scales the length of a gap with
gapValue. |
| 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 LinearGap(float gapValue)
gapValue.gapValue - a constant gap valuepublic final float value(int fromIndex,
int toIndex)
GapfromIndex to
toIndex -1. The value must be non-positive.public final float max()
Gappublic final float min()
GapCopyright © 2014–2018. All rights reserved.