Class FeatureCalculationContext<S>
Object
FeatureCalculationContext<S>
- Type Parameters:
S
- encapsulation of the features that provide the calculation.
The context in which features are calculated, so as to be later exported as a CSV.
-
Constructor Summary
ConstructorsConstructorDescriptionFeatureCalculationContext
(FeatureResultsAndThumbnails results, S rowSource, FeatureNameList featureNames, Optional<String> groupGeneratorName, ExecutionTimeRecorder executionTimeRecorder, boolean suppressErrors, InputOutputContext context) Creates a newFeatureCalculationContext
. -
Method Summary
Modifier and TypeMethodDescriptionThe input-output context for the operation.Records the execution-time of particular operations.The name of each feature being calculated, in identical order, as that is placed in the exported CSV.The features that are calculated, encapsulated in some object.The optional name of the group generator.Gets the logger for the context.Gets the model directory path.Gets the operation context.The stored results and thumbnail writer.boolean
When false, an image is reported as errored, if any exception is thrown during calculation.boolean
Whether thumbnails are enabled for output.
-
Constructor Details
-
FeatureCalculationContext
public FeatureCalculationContext(FeatureResultsAndThumbnails results, S rowSource, FeatureNameList featureNames, Optional<String> groupGeneratorName, ExecutionTimeRecorder executionTimeRecorder, boolean suppressErrors, InputOutputContext context) Creates a newFeatureCalculationContext
.- Parameters:
results
- the stored results and thumbnail writerrowSource
- the source of features to be calculatedfeatureNames
- the names of features to be calculatedgroupGeneratorName
- the optional name of the group generatorexecutionTimeRecorder
- records execution time of operationssuppressErrors
- if true, exceptions during calculation are suppressedcontext
- the input-output context for the operation
-
-
Method Details
-
getModelDirectory
Gets the model directory path.- Returns:
- the
Path
to the model directory
-
getLogger
Gets the logger for the context.- Returns:
- the
Logger
instance
-
getOperationContext
Gets the operation context.- Returns:
- the
OperationContext
instance
-
getResults
The stored results and thumbnail writer. -
getFeatureSource
The features that are calculated, encapsulated in some object. -
getFeatureNames
The name of each feature being calculated, in identical order, as that is placed in the exported CSV. -
getGroupGeneratorName
The optional name of the group generator. -
getExecutionTimeRecorder
Records the execution-time of particular operations. -
getContext
The input-output context for the operation. -
isSuppressErrors
public boolean isSuppressErrors()When false, an image is reported as errored, if any exception is thrown during calculation. When true, then a value ofDouble.NaN
is returned, and a message is written to the error-log. -
isThumbnailsEnabled
public boolean isThumbnailsEnabled()Whether thumbnails are enabled for output.
-