Class EnergyScheme
Object
org.anchoranalysis.mpp.feature.energy.scheme.EnergyScheme
public class EnergyScheme extends Object
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
Constructors Constructor Description EnergyScheme(FeatureList<FeatureInputSingleMemo> elemInd, FeatureList<FeatureInputPairMemo> elemPair, FeatureList<FeatureInputAllMemo> elemAll, RegionMap regionMap, AddCriteriaPair pairAddCriteria)Creates an energy scheme with the specified features and region map.EnergyScheme(FeatureList<FeatureInputSingleMemo> elemInd, FeatureList<FeatureInputPairMemo> elemPair, FeatureList<FeatureInputAllMemo> elemAll, RegionMap regionMap, AddCriteriaPair pairAddCriteria, Optional<org.anchoranalysis.bean.shared.dictionary.DictionaryProvider> dictionary, List<NamedBean<Feature<org.anchoranalysis.image.feature.input.FeatureInputStack>>> listImageFeatures)Creates an energy scheme with the specified features, region map, and additional options. -
Method Summary
Modifier and Type Method Description DictionarycreateDictionary()Creates and returns the associatedDictionaryor an empty dictionary if none is associated.FeatureList<FeatureInputAllMemo>getElemAllAsFeatureList()Gets the feature list for all elements together.<T extends FeatureInput>
FeatureList<T>getElemByCliqueSize(int cliqueSize)Gets the feature list for a specific clique size.FeatureList<FeatureInputSingleMemo>getElemIndAsFeatureList()Gets the feature list for individual elements.FeatureList<FeatureInputPairMemo>getElemPairAsFeatureList()Gets the feature list for pairs of elements.List<NamedBean<Feature<org.anchoranalysis.image.feature.input.FeatureInputStack>>>getListImageFeatures()Gets the list of image features to be calculated first.AddCriteriaPairgetPairAddCriteria()Gets the criteria for adding pairs to the energy calculation.RegionMapgetRegionMap()Gets the region map used in the energy scheme.
-
Constructor Details
-
EnergyScheme
public EnergyScheme(FeatureList<FeatureInputSingleMemo> elemInd, FeatureList<FeatureInputPairMemo> elemPair, FeatureList<FeatureInputAllMemo> elemAll, RegionMap regionMap, AddCriteriaPair pairAddCriteria) throws CreateExceptionCreates an energy scheme with the specified features and region map.- Parameters:
elemInd- features for individual elementselemPair- features for pairs of elementselemAll- 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> elemInd, FeatureList<FeatureInputPairMemo> elemPair, FeatureList<FeatureInputAllMemo> elemAll, RegionMap regionMap, AddCriteriaPair pairAddCriteria, Optional<org.anchoranalysis.bean.shared.dictionary.DictionaryProvider> dictionary, List<NamedBean<Feature<org.anchoranalysis.image.feature.input.FeatureInputStack>>> listImageFeatures) throws CreateExceptionCreates an energy scheme with the specified features, region map, and additional options.- Parameters:
elemInd- features for individual elementselemPair- features for pairs of elementselemAll- 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 associatedDictionaryor 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
FeatureListfor the specified clique size - Throws:
AnchorImpossibleSituationException- if an invalid clique size is provided
-
getElemIndAsFeatureList
Gets the feature list for individual elements.- Returns:
- the
FeatureListfor individual elements
-
getElemPairAsFeatureList
Gets the feature list for pairs of elements.- Returns:
- the
FeatureListfor pairs of elements
-
getElemAllAsFeatureList
Gets the feature list for all elements together.- Returns:
- the
FeatureListfor all elements
-
getPairAddCriteria
Gets the criteria for adding pairs to the energy calculation.- Returns:
- the
AddCriteriaPairfor pair addition
-
getListImageFeatures
public List<NamedBean<Feature<org.anchoranalysis.image.feature.input.FeatureInputStack>>> getListImageFeatures()Gets the list of image features to be calculated first.- Returns:
- the list of
NamedBeans containing image features
-
getRegionMap
Gets the region map used in the energy scheme.- Returns:
- the
RegionMapfor the energy scheme
-