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.models.mixture.motif.positionprior
Class UniformPositionPrior

    java.lang.Object
      de.jstacs.models.mixture.motif.positionprior.PositionPrior
          de.jstacs.models.mixture.motif.positionprior.UniformPositionPrior

All Implemented Interfaces:
  Storable, Cloneable

    public class UniformPositionPrior

extends PositionPrior

This prior implements a uniform distribution for the start position.

Author:
  Jens Keilwagen

Field Summary

Fields inherited from class de.jstacs.models.mixture.motif.positionprior.PositionPrior
`motifLength`

Constructor Summary
`UniformPositionPrior()` This empty constructor creates an instance with motif length -1.
`UniformPositionPrior(StringBuffer xml)` The standard constructor for the interface `Storable`.

Method Summary
`protected void` | `extractAdditionalInformation(StringBuffer xml)` This method extracts additional information from the StringBuffer.
`protected StringBuffer` | `getAdditionalInformation()` This method returns a StringBuffer containing additional information for the XML representation.
`String` | `getInstanceName()` Returns the instance name
`int` | `getLength()` Returns the length that is supported by this prior.
`double` | `getLogPriorForPositions(int seqLength, int... starts)` The logarithmic value of the prior for specified start positions of the part motifs.

Methods inherited from class de.jstacs.models.mixture.motif.positionprior.PositionPrior
`clone, setMotifLength, toXML`

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

Constructor Detail

### UniformPositionPrior

    public UniformPositionPrior()

  This empty constructor creates an instance with motif length -1.

### UniformPositionPrior

    public UniformPositionPrior(StringBuffer xml)
                         throws NonParsableException

  The standard constructor for the interface `Storable`.

  Parameters:
    `xml` - the StringBuffer containing the model
  Throws:
    `NonParsableException` - if the StringBuffer can not be parsed

Method Detail

### getLogPriorForPositions

    public double getLogPriorForPositions(int seqLength,
                                          int... starts)
                                   throws IllegalArgumentException

  Description copied from class: `PositionPrior`
  The logarithmic value of the prior for specified start positions of the part motifs.

  Specified by:
    `getLogPriorForPositions` in class `PositionPrior`
  Parameters:
    `seqLength` - the length of the sequence
    `starts` - the start positions of the part motifs
  Returns:
    the value of the prior for given start positions
  Throws:
    `IllegalArgumentException` - if something went wrong, e.g. the motif length is not set.

### getLength

    public final int getLength()

  Description copied from class: `PositionPrior`
  Returns the length that is supported by this prior. If all length bigger than the minimal length are supported, this method return 0.

  Specified by:
    `getLength` in class `PositionPrior`
  Returns:
    the length that is supported or 0 for all lengths

### getInstanceName

    public String getInstanceName()

  Description copied from class: `PositionPrior`
  Returns the instance name

  Specified by:
    `getInstanceName` in class `PositionPrior`
  Returns:
    the instance name

### getAdditionalInformation

    protected StringBuffer getAdditionalInformation()

  Description copied from class: `PositionPrior`
  This method returns a StringBuffer containing additional information for the XML representation.

  Specified by:
    `getAdditionalInformation` in class `PositionPrior`
  Returns:
    a StringBuffer containing additional information for the XML representation

### extractAdditionalInformation

    protected void extractAdditionalInformation(StringBuffer xml)

  Description copied from class: `PositionPrior`
  This method extracts additional information from the StringBuffer.

  Specified by:
    `extractAdditionalInformation` in class `PositionPrior`
  Parameters:
    `xml` - the StringBuffer containing the additional information of the XML representation

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