Class MergeToIncreaseObjectFeature

Object
AnchorBean<ObjectCollectionProvider>
InitializableBean<ObjectCollectionProvider, ImageInitialization>
ImageBean<ObjectCollectionProvider>
ObjectCollectionProvider
ObjectCollectionProviderUnary
All Implemented Interfaces:
Provider<ObjectCollection>

public class MergeToIncreaseObjectFeature extends MergeWithFeature
Merges neighboring objects if it results in an increase in the average feature-value calculated on each single object.

A merge occurs if feature(merged) >= avg( feature(object1), feature(object2).

These merges occur in order of the maximum increase offered, and the algorithm recursively merge until all possible merges are complete.

The feature-value is calculated for each object that is a vertex of the graph (including all prospective merges of neighbors).

Author:
Owen Feehan
  • Constructor Details

    • MergeToIncreaseObjectFeature

      public MergeToIncreaseObjectFeature()
  • Method Details

    • createPayloadCalculator

      protected PayloadCalculator createPayloadCalculator() throws OperationFailedException
      Description copied from class: MergeWithFeature
      Determines the payload for any given or potential vertex.
      Specified by:
      createPayloadCalculator in class MergeWithFeature
      Returns:
      a PayloadCalculator for determining vertex payloads
      Throws:
      OperationFailedException - if the payload calculator cannot be created
    • createPrioritizer

      protected AssignPriority createPrioritizer() throws OperationFailedException
      Description copied from class: MergeWithFeature
      Determines the priority (and selection criteria) used to allow merges between neighbors.
      Specified by:
      createPrioritizer in class MergeWithFeature
      Returns:
      an AssignPriority for determining merge priorities
      Throws:
      OperationFailedException - if the prioritizer cannot be created
    • isPlayloadUsed

      protected boolean isPlayloadUsed()
      Description copied from class: MergeWithFeature
      Checks if the payload is considered in making decisions.
      Specified by:
      isPlayloadUsed in class MergeWithFeature
      Returns:
      true if the payload is used, false if the payload of nodes is irrelevant
    • getFeatureEvaluator

      public FeatureEvaluator<FeatureInputSingleObject> getFeatureEvaluator()
    • setFeatureEvaluator

      public void setFeatureEvaluator(FeatureEvaluator<FeatureInputSingleObject> featureEvaluator)