org.biojava.bio.dist
Class UniformDistribution
java.lang.Object
org.biojava.utils.AbstractChangeable
org.biojava.bio.dist.AbstractDistribution
org.biojava.bio.dist.UniformDistribution
- All Implemented Interfaces:
- Changeable, Distribution, java.io.Serializable
- public class UniformDistribution
- extends AbstractDistribution
- implements java.io.Serializable
An implementation of an uniform distribution
- Author:
- Matthew Pocock, Mark Schreiber, Thomas Down
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UniformDistribution
public UniformDistribution(FiniteAlphabet alphabet)
getAlphabet
public Alphabet getAlphabet()
- Description copied from interface:
Distribution
- The alphabet from which this spectrum emits symbols.
- Specified by:
getAlphabet
in interface Distribution
- Returns:
- the Alphabet associated with this spectrum
getNullModel
public Distribution getNullModel()
- Description copied from interface:
Distribution
- Retrieve the null model Distribution that this Distribution recognizes.
- Specified by:
getNullModel
in interface Distribution
- Returns:
- the apropriate null model
setNullModelImpl
protected void setNullModelImpl(Distribution nullModel)
throws IllegalAlphabetException
- Assign a background distribution
- Specified by:
setNullModelImpl
in class AbstractDistribution
- Parameters:
nullModel
- the background distribution to assign
- Throws:
IllegalAlphabetException
getWeightImpl
protected double getWeightImpl(AtomicSymbol s)
throws IllegalSymbolException
- Specified by:
getWeightImpl
in class AbstractDistribution
- Throws:
IllegalSymbolException
setWeightImpl
protected void setWeightImpl(AtomicSymbol sym,
double weight)
throws ChangeVetoException
- Specified by:
setWeightImpl
in class AbstractDistribution
- Throws:
ChangeVetoException
registerWithTrainer
public void registerWithTrainer(DistributionTrainerContext dtc)
- Description copied from class:
AbstractDistribution
- Register an IgnoreCountsTrainer instance as the trainer for this
distribution. Override this if you wish to implement a trainable
distribution.
- Specified by:
registerWithTrainer
in interface Distribution
- Overrides:
registerWithTrainer
in class AbstractDistribution