Class EnergyScheme
Object
EnergyScheme
The energy for a feature-list as factorized into different cliques.
elemInd: individual terms of clique-size==1 f_1(x) elemPair: pairwise terms of clique-size==2 f_2(x,y) elemAll: terms that include every item in the set f_all(x_1,x_2,....x_n) for all n
- Author:
- Owen Feehan
-
Constructor Summary
ConstructorsConstructorDescriptionEnergyScheme
(FeatureList<FeatureInputSingleMemo> individual, FeatureList<FeatureInputPairMemo> pair, FeatureList<FeatureInputAllMemo> all, RegionMap regionMap, AddCriteriaPair pairAddCriteria) Creates an energy scheme with the specified features and region map.EnergyScheme
(FeatureList<FeatureInputSingleMemo> individual, FeatureList<FeatureInputPairMemo> pair, FeatureList<FeatureInputAllMemo> all, RegionMap regionMap, AddCriteriaPair pairAddCriteria, Optional<DictionaryProvider> dictionary, List<NamedBean<Feature<FeatureInputStack>>> listImageFeatures) Creates an energy scheme with the specified features, region map, and additional options. -
Method Summary
Modifier and TypeMethodDescriptionCreates and returns the associatedDictionary
or an empty dictionary if none is associated.getAll()
Features for all elements together.<T extends FeatureInput>
FeatureList<T> getElemByCliqueSize
(int cliqueSize) Gets the feature list for a specific clique size.Features for individual elements (clique-size==1).A list of features of the image that are calculated first, and exposed to the other features as parameters.getPair()
Features for pairs of elements (clique-size==2).Criteria for adding pairs to the energy calculation.The region map used in the energy scheme.
-
Constructor Details
-
EnergyScheme
public EnergyScheme(FeatureList<FeatureInputSingleMemo> individual, FeatureList<FeatureInputPairMemo> pair, FeatureList<FeatureInputAllMemo> all, RegionMap regionMap, AddCriteriaPair pairAddCriteria) throws CreateException Creates an energy scheme with the specified features and region map.- Parameters:
individual
- features for individual elementspair
- features for pairs of elementsall
- features for all elements togetherregionMap
- the region map to usepairAddCriteria
- criteria for adding pairs- Throws:
CreateException
- if the energy scheme cannot be created
-
EnergyScheme
public EnergyScheme(FeatureList<FeatureInputSingleMemo> individual, FeatureList<FeatureInputPairMemo> pair, FeatureList<FeatureInputAllMemo> all, RegionMap regionMap, AddCriteriaPair pairAddCriteria, Optional<DictionaryProvider> dictionary, List<NamedBean<Feature<FeatureInputStack>>> listImageFeatures) throws CreateException Creates an energy scheme with the specified features, region map, and additional options.- Parameters:
individual
- features for individual elementspair
- features for pairs of elementsall
- features for all elements togetherregionMap
- the region map to usepairAddCriteria
- criteria for adding pairsdictionary
- optional dictionary providerlistImageFeatures
- list of image features to be calculated first- Throws:
CreateException
- if the energy scheme cannot be created
-
-
Method Details
-
createDictionary
Creates and returns the associatedDictionary
or an empty dictionary if none is associated.- Returns:
- the created
Dictionary
- Throws:
CreateException
- if the dictionary cannot be created
-
getElemByCliqueSize
Gets the feature list for a specific clique size.- Type Parameters:
T
- the type ofFeatureInput
- Parameters:
cliqueSize
- 1 for pairwise, 0 for unary, -1 for all- Returns:
- the
FeatureList
for the specified clique size - Throws:
AnchorImpossibleSituationException
- if an invalid clique size is provided
-
getIndividual
Features for individual elements (clique-size==1). -
getPair
Features for pairs of elements (clique-size==2). -
getAll
Features for all elements together. -
getRegionMap
The region map used in the energy scheme. -
getListImageFeatures
A list of features of the image that are calculated first, and exposed to the other features as parameters. -
getPairAddCriteria
Criteria for adding pairs to the energy calculation.
-