Package org.biojava.bio.dist
Interface DistributionFactory
- All Known Implementing Classes:
DistributionFactory.DefaultDistributionFactory
,OrderNDistributionFactory
public interface DistributionFactory
A thing that can make Distributions.
This decouples programs from needing to know what implementation of Distribution to instantiate for a given alphabet. It also lets you parameterise model creation for things like profile HMMs.
- Since:
- 1.0
- Author:
- Matthew Pocock
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic class
The default DistributionFactory implementation. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final DistributionFactory
The default DistributionFactory object. -
Method Summary
Modifier and TypeMethodDescriptioncreateDistribution
(Alphabet alpha) Generate a new Distribution as requested.
-
Field Details
-
DEFAULT
The default DistributionFactory object.
You may wish to alias this within your scripts with something like: DistributionFactory dFact = DistributionFactory.DEFAULT; dFact.createDistribution(...);
-
-
Method Details
-
createDistribution
Generate a new Distribution as requested.- Parameters:
alpha
- the emission alphabet for the state- Returns:
- a new Distribution instance
- Throws:
IllegalAlphabetException
- if the factory is unable to generate a distribution for the required alphabet
-