Package org.biojava.bio.dist
Class OrderNDistributionFactory
java.lang.Object
org.biojava.bio.dist.OrderNDistributionFactory
- All Implemented Interfaces:
DistributionFactory
Default factory for Order-N distributions.
- Since:
- 1.1
- Author:
- Thomas Down, Mark Schreiber
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.biojava.bio.dist.DistributionFactory
DistributionFactory.DefaultDistributionFactory -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final DistributionFactoryFactory which used DistributionFactory.DEFAULT to create conditioned distributions. -
Constructor Summary
ConstructorsConstructorDescriptionConstruct a new OrderNDistributionFactory with a specified factory for conditioned distributions. -
Method Summary
Modifier and TypeMethodDescriptioncreateDistribution(Alphabet alpha) Creates an OrderNDistribution of the appropriate type.
-
Field Details
-
DEFAULT
Factory which used DistributionFactory.DEFAULT to create conditioned distributions.
-
-
Constructor Details
-
OrderNDistributionFactory
Construct a new OrderNDistributionFactory with a specified factory for conditioned distributions.- Parameters:
df- The DistributionFactory used for construction new conditioned distributions.
-
-
Method Details
-
createDistribution
Creates an OrderNDistribution of the appropriate type.- Specified by:
createDistributionin interfaceDistributionFactory- Parameters:
alpha- the Alphabet should be in a form that clearly indicates the conditioning and the conditioned alphabet unless it is very obvious. For example (DNA x DNA) is obvious, ((DNA x DNA x DNA) x DNA) indicates that (DNA x DNA x DNA) is the conditioningAlphabetand DNA is the conditionedAlphabet. (DNA x DNA x DNA x DNA) doesn't but for compatibility with biojava 1.2 this is allowed in the constructor. As from biojava 1.2.3 or greater this will be internally converted to ((DNA x DNA x DNA) x DNA) which was the convention implied by biojava 1.2 Calls to the returnedDistributionsgetAlphabet()method will return the convertedAlphabet.- Returns:
- An OrderNDistribution
- Throws:
IllegalAlphabetException- if a Distribution cannot be made with thatAlphabet.
-