Package com.activeviam.copper
Class MeasureOptimizer
- java.lang.Object
-
- com.activeviam.copper.MeasureOptimizer
-
@Deprecated(since="6.0.7", forRemoval=true) public class MeasureOptimizer extends Object
Deprecated, for removal: This API element is subject to removal in a future version.Component that can give an optimized version of aIInternalCopperMeasureif detects a better version can be built. AnIInternalCopperMeasureis considered as better than another one if it represents the same calculation more efficiently.
-
-
Constructor Summary
Constructors Constructor Description MeasureOptimizer(IInternalCopperContext context)Deprecated, for removal: This API element is subject to removal in a future version.Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description IInternalCopperMeasuregetPublishableMeasure(IInternalCopperMeasure measure)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.CopperTreeoptimize(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 Detail
-
MeasureOptimizer
public MeasureOptimizer(IInternalCopperContext context)
Deprecated, for removal: This API element is subject to removal in a future version.Constructor.- Parameters:
context- the context
-
-
Method Detail
-
optimize
public CopperTree 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.- Parameters:
measure- the measure to optimize- Returns:
- the optimized version of the given measure
-
rewriteTree
public static void rewriteTree(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.- Parameters:
tree- the tree to rewriterewriter- a supplier of a new stateful rewriter each time, to operate on the tree
-
getPublishableMeasure
public IInternalCopperMeasure getPublishableMeasure(IInternalCopperMeasure measure)
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
-
-