public class SimpleGapPenalty extends Object implements GapPenalty, Serializable
GapPenalty.Type
Constructor and Description |
---|
SimpleGapPenalty()
Creates a new set of gap penalties using the defaults.
|
SimpleGapPenalty(int gop,
int gep)
Creates a new set of gap penalties.
|
Modifier and Type | Method and Description |
---|---|
int |
getExtensionPenalty()
Returns the negative of the extension penalty passed to the constructor.
|
int |
getOpenPenalty()
Returns the negative of the opening penalty passed to the constructor.
|
GapPenalty.Type |
getType()
Returns
GapPenalty.Type stored. |
static void |
setDefaultExtensionPenalty(int gep)
Sets the default gap extension penalty.
|
static void |
setDefaultOpenPenalty(int gop)
Sets the default gap open penalty.
|
void |
setExtensionPenalty(int gep)
Sets penalty given when an already open gap elongates by a single element
|
void |
setOpenPenalty(int gop)
Sets penalty given when a deletion or insertion gap first opens
|
public SimpleGapPenalty()
public SimpleGapPenalty(int gop, int gep)
gop
- the gap open penalty; should be nonnegativegep
- the gap extension penalty; should be nonnegativepublic static void setDefaultExtensionPenalty(int gep)
gep
- the default gap extension penaltypublic static void setDefaultOpenPenalty(int gop)
gop
- the default gap open penaltypublic int getExtensionPenalty()
getExtensionPenalty
in interface GapPenalty
public int getOpenPenalty()
getOpenPenalty
in interface GapPenalty
public GapPenalty.Type getType()
GapPenalty
GapPenalty.Type
stored.getType
in interface GapPenalty
public void setExtensionPenalty(int gep)
GapPenalty
setExtensionPenalty
in interface GapPenalty
gep
- Should be nonnegativepublic void setOpenPenalty(int gop)
GapPenalty
setOpenPenalty
in interface GapPenalty
gop
- Should be nonnegativeCopyright © 2000–2019 BioJava. All rights reserved.