Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## de.jstacs.algorithms
Class Alignment.SimpleCosts

    java.lang.Object
      de.jstacs.algorithms.Alignment.SimpleCosts

All Implemented Interfaces:
  Alignment.Costs

Enclosing class:
  Alignment

    public static class Alignment.SimpleCosts

extends Object
implements Alignment.Costs

Class for simple costs with costs `mismatch` for a mismatch, costs `start` to start a new gap, costs `elong` to elongate a gap by one position and costs of `0` for a match.

Nested Class Summary

Nested classes/interfaces inherited from interface de.jstacs.algorithms.Alignment.Costs
`Alignment.Costs.Direction`

Constructor Summary
`Alignment.SimpleCosts(double mismatch, double start, double elong)` Creates a new instance of simple costs with costs `mismatch` for a mismatch, costs `start` to start a new gap, costs `elong` to elongate a gap by one position and costs of `0` for a match.

Method Summary
`double` | `getCostFor(Sequence s1, Sequence s2, int i, int j, Alignment.Costs.Direction from)` Returns the costs for the alignment if `s1(i)` and `s2(j)` coming from `from`.
`double` | `getElongateCosts()` Returns the costs to elongate a gap by one position.
`double` | `getGapCostsFor(int length)` Returns the costs for a gap of length `length`.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Alignment.SimpleCosts

    public Alignment.SimpleCosts(double mismatch,
                                 double start,
                                 double elong)

  Creates a new instance of simple costs with costs `mismatch` for a mismatch, costs `start` to start a new gap, costs `elong` to elongate a gap by one position and costs of `0` for a match.

  Parameters:
    `mismatch` - the mismatch costs
    `start` - the costs to start a gap
    `elong` - the costs to elongate a gap

Method Detail

### getCostFor

    public double getCostFor(Sequence s1,
                             Sequence s2,
                             int i,
                             int j,
                             Alignment.Costs.Direction from)

  Description copied from interface: `Alignment.Costs`
  Returns the costs for the alignment if `s1(i)` and `s2(j)` coming from `from`.

  Specified by:
    `getCostFor` in interface `Alignment.Costs`
  Parameters:
    `s1` - the first sequence
    `s2` - the second sequence
    `i` - the index in the first sequence
    `j` - the index in the second sequence
    `from` - the direction within the DP-matrix
  Returns:
    the costs

### getElongateCosts

    public double getElongateCosts()

  Description copied from interface: `Alignment.Costs`
  Returns the costs to elongate a gap by one position.

  Specified by:
    `getElongateCosts` in interface `Alignment.Costs`
  Returns:
    the corresponding costs

### getGapCostsFor

    public double getGapCostsFor(int length)

  Description copied from interface: `Alignment.Costs`
  Returns the costs for a gap of length `length`.

  Specified by:
    `getGapCostsFor` in interface `Alignment.Costs`
  Parameters:
    `length` - the length of the gap
  Returns:
    the corresponding costs

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD