Class PairsTableCalculator

Object
PairsTableCalculator
All Implemented Interfaces:
FeatureCalculatorMulti<FeatureInputPairObjects>, FeatureTableCalculator<FeatureInputPairObjects>

public class PairsTableCalculator extends Object implements FeatureTableCalculator<FeatureInputPairObjects>
A feature-session to evaluate pairs of objects.

Successive pairs are evaluated in five different ways:

  • the image in which the object exists (on {code listImage}) i.e. the energy-stack.
  • the left-object in the pair (on listSingle)
  • the right-object in the pair (on listSingle)
  • the pair (on {code listPair})
  • both objects merged together (on {code listSingle}}

Due to the predictable pattern, feature-calculations can be cached predictably and appropriately to avoid redundancies.

Two types of caching are applied to avoid redundancy:

  • The internal calculation caches of first/second/merged are reused as the internal calculation sub-caches in pair.
  • The entire results are cached (as a function of the input) for first/second, as the same inputs reappear multiple times.
Author:
Owen Feehan