Package com.activeviam.copper
Class MeasureOptimizer
java.lang.Object
com.activeviam.copper.MeasureOptimizer
Deprecated, for removal: This API element is subject to removal in a future version.
Component that can give an optimized version of a
IInternalCopperMeasure if detects a
better version can be built. An IInternalCopperMeasure is considered as better than
another one if it represents the same calculation more efficiently.-
Constructor Summary
ConstructorsConstructorDescriptionMeasureOptimizer(IInternalCopperContext context) Deprecated, for removal: This API element is subject to removal in a future version.Constructor. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated, for removal: This API element is subject to removal in a future version.Returns the publishable version of the given measure i.e the one that underwent someoptimization.optimize(IInternalCopperMeasure measure) Deprecated, for removal: This API element is subject to removal in a future version.Builds a newIInternalCopperMeasureif it detects a better version can be built.static voidrewriteTree(CopperTree tree, Supplier<ACopperTreeRewriter> rewriter) Deprecated, for removal: This API element is subject to removal in a future version.Rewrites the tree repeatedly until no further modification can be made.
-
Constructor Details
-
MeasureOptimizer
Deprecated, for removal: This API element is subject to removal in a future version.Constructor.- Parameters:
context- the context
-
-
Method Details
-
optimize
Deprecated, for removal: This API element is subject to removal in a future version.Builds a newIInternalCopperMeasureif it detects a better version can be built.- Parameters:
measure- the measure to optimize- Returns:
- the optimized version of the given measure
-
rewriteTree
Deprecated, for removal: This API element is subject to removal in a future version.Rewrites the tree repeatedly until no further modification can be made.- Parameters:
tree- the tree to rewriterewriter- a supplier of a new stateful rewriter each time, to operate on the tree
-
getPublishableMeasure
Deprecated, for removal: This API element is subject to removal in a future version.Returns the publishable version of the given measure i.e the one that underwent someoptimization.- Parameters:
measure- the measure before publication- Returns:
- the new instance that will be published
-