public class DistinctCostEstimator extends Object implements ICostEstimate
LOG| Constructor and Description |
|---|
DistinctCostEstimator(int nRows,
CompressionSettings cs) |
| Modifier and Type | Method and Description |
|---|---|
double |
getCostOfCollectionOfGroups(Collection<CompressedSizeInfoColGroup> gs)
Get the computation cost of a collection of column groups information.
|
double |
getCostOfCollectionOfGroups(Collection<CompressedSizeInfoColGroup> gs,
CompressedSizeInfoColGroup g) |
double |
getCostOfColumnGroup(CompressedSizeInfoColGroup g)
If the instruction does not care about the inter column group cost, such as in memory cost or in computation cost
of right or left matrix multiplication we simply estimate the cost of individual column groups.
|
double |
getCostOfTwoGroups(CompressedSizeInfoColGroup g1,
CompressedSizeInfoColGroup g2) |
double |
getUncompressedCost(int nRows,
int nCols,
int sparsity)
Calculate the cost of execution if uncompressed.
|
boolean |
isCompareAll()
Function that returns true if the cost is based an an all compare all column groups false otherwise.
|
boolean |
shouldAnalyze(CompressedSizeInfoColGroup g1,
CompressedSizeInfoColGroup g2)
Decide if the column groups should be analysed, or the worst case join should be expected.
|
boolean |
shouldTryJoin(CompressedSizeInfoColGroup g1,
CompressedSizeInfoColGroup g2)
Decide if the column groups should try to join, this is to filter obviously bad joins out.
|
public DistinctCostEstimator(int nRows,
CompressionSettings cs)
public double getUncompressedCost(int nRows,
int nCols,
int sparsity)
ICostEstimategetUncompressedCost in interface ICostEstimatenRows - Number of rows in compressionnCols - Number of columns in compressionsparsity - Sparsity of the inputpublic double getCostOfColumnGroup(CompressedSizeInfoColGroup g)
ICostEstimategetCostOfColumnGroup in interface ICostEstimateg - Column group to estimate the cost ofpublic double getCostOfCollectionOfGroups(Collection<CompressedSizeInfoColGroup> gs)
ICostEstimategetCostOfCollectionOfGroups in interface ICostEstimategs - All the groups considered for this cost calculationpublic double getCostOfCollectionOfGroups(Collection<CompressedSizeInfoColGroup> gs, CompressedSizeInfoColGroup g)
getCostOfCollectionOfGroups in interface ICostEstimatepublic double getCostOfTwoGroups(CompressedSizeInfoColGroup g1, CompressedSizeInfoColGroup g2)
getCostOfTwoGroups in interface ICostEstimatepublic boolean isCompareAll()
ICostEstimateisCompareAll in interface ICostEstimatepublic boolean shouldAnalyze(CompressedSizeInfoColGroup g1, CompressedSizeInfoColGroup g2)
ICostEstimateshouldAnalyze in interface ICostEstimateg1 - Group 1g2 - Group 2public boolean shouldTryJoin(CompressedSizeInfoColGroup g1, CompressedSizeInfoColGroup g2)
ICostEstimateshouldTryJoin in interface ICostEstimateg1 - Group 1g2 - Group 2Copyright © 2021 The Apache Software Foundation. All rights reserved.