Class MergePairs

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

public class MergePairs extends MergeWithFeature
Merges objects if a pair feature value satisfies a condition.

The pair feature is calculated on all combinations of any two neighboring objects (but only once for each pair, unidirectionally).

The merges occur in order of the maximum increase offered (if the value exceeds the threshold), and the algorithm recursively merge until all possible merges are complete.

  • Constructor Details

    • MergePairs

      public MergePairs()
  • Method Details

    • createPayloadCalculator

      protected PayloadCalculator createPayloadCalculator()
      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
    • 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
    • getFeatureEvaluatorThreshold

      public FeatureEvaluator<FeatureInputNull> getFeatureEvaluatorThreshold()
      Allows merge only if the feature-value satisfies a relation to this threshold
    • setFeatureEvaluatorThreshold

      public void setFeatureEvaluatorThreshold(FeatureEvaluator<FeatureInputNull> featureEvaluatorThreshold)
      Allows merge only if the feature-value satisfies a relation to this threshold
    • getRelation

      public RelationBean getRelation()
      Relation to threshold
    • setRelation

      public void setRelation(RelationBean relation)
      Relation to threshold
    • getFeatureEvaluatorMerge

      public FeatureEvaluator<FeatureInputPairObjects> getFeatureEvaluatorMerge()
    • setFeatureEvaluatorMerge

      public void setFeatureEvaluatorMerge(FeatureEvaluator<FeatureInputPairObjects> featureEvaluatorMerge)