Create a new operator cost strategy with a table of costs.
(cost: OperatorCost)
| 519 | impl OperatorCostStrategy { |
| 520 | /// Create a new operator cost strategy with a table of costs. |
| 521 | pub fn table(cost: OperatorCost) -> Self { |
| 522 | OperatorCostStrategy::Table(Box::new(cost)) |
| 523 | } |
| 524 | |
| 525 | /// Get the cost of an operator. |
| 526 | pub fn cost(&self, op: &Operator) -> i64 { |