Interface FeatureCalculatorMulti<T extends FeatureInput>

Type Parameters:
T - feature input-type
All Known Subinterfaces:
FeatureTableCalculator<T>
All Known Implementing Classes:
FeatureCalculatorMultiChangeInput, PairsTableCalculator, SequentialSession, SingleTableCalculator

public interface FeatureCalculatorMulti<T extends FeatureInput>
Like a FeatureCalculator but is permanently associated with one or more Features.
Author:
Owen Feehan
  • Method Details

    • calculate

      Calculate the results of the features with a particular input.
      Parameters:
      input - the input to calculate.
      Returns:
      the results of the calculation.
      Throws:
      NamedFeatureCalculateException - if any feature cannot be successfully calculated.
    • calculate

      ResultsVector calculate(T input, FeatureList<T> featuresSubset) throws NamedFeatureCalculateException
      Calculates the results of a subset of the features with a particular input.
      Parameters:
      input - the input to calculate.
      featuresSubset - the subset of features (from those bound to the current instance) to calculate with.
      Returns:
      the results of the calculation.
      Throws:
      NamedFeatureCalculateException - if any feature cannot be successfully calculated.
    • calculateSuppressErrors

      ResultsVector calculateSuppressErrors(T input, ErrorReporter errorReporter)
      Calculates the results for an input recording the error to an ErrorReporter if anything goes wrong, but throwing no exception.
      Parameters:
      input - the input to calculate.
      errorReporter - where errors are recorded.
      Returns:
      the results of the calculation.
    • calculate

      default ResultsVector calculate(T input, ErrorReporter errorReporter, boolean suppressErrors) throws NamedFeatureCalculateException
      Calculates the results for an input, either calling calculate(T) or calculateSuppressErrors(T, org.anchoranalysis.core.log.error.ErrorReporter) depending on a flag.
      Parameters:
      input - the input to calculate.
      errorReporter - where errors are recorded.
      suppressErrors - if true, errors are recorded via the errorReporter. if false, they are thrown as exceptions.
      Returns:
      the results of the calculation.
      Throws:
      NamedFeatureCalculateException - if suppressErrors==false and an error occurs during calculation.
    • sizeFeatures

      int sizeFeatures()
      The number of features that is calculated on each call to calculate(T), and therefore the size of the returned ResultsVector.
      Returns:
      the number of features.