pub struct TreeAdditiveCostModel {}Expand description
A cost model that computes the cost by summing the cost of each node.
Trait Implementations§
Source§impl Clone for TreeAdditiveCostModel
impl Clone for TreeAdditiveCostModel
Source§fn clone(&self) -> TreeAdditiveCostModel
fn clone(&self) -> TreeAdditiveCostModel
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl CostModel<u64> for TreeAdditiveCostModel
impl CostModel<u64> for TreeAdditiveCostModel
Source§fn fold(
&self,
_head: &str,
children_cost: &[DefaultCost],
head_cost: DefaultCost,
) -> DefaultCost
fn fold( &self, _head: &str, children_cost: &[DefaultCost], head_cost: DefaultCost, ) -> DefaultCost
The total cost of a term given the cost of the root e-node and its immediate children’s total costs.
Source§fn enode_cost(
&self,
_egraph: &EGraph,
func: &Function,
_row: &FunctionRow<'_>,
) -> DefaultCost
fn enode_cost( &self, _egraph: &EGraph, func: &Function, _row: &FunctionRow<'_>, ) -> DefaultCost
The cost of an enode (without the cost of children)
Source§impl Default for TreeAdditiveCostModel
impl Default for TreeAdditiveCostModel
Source§fn default() -> TreeAdditiveCostModel
fn default() -> TreeAdditiveCostModel
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TreeAdditiveCostModel
impl RefUnwindSafe for TreeAdditiveCostModel
impl Send for TreeAdditiveCostModel
impl Sync for TreeAdditiveCostModel
impl Unpin for TreeAdditiveCostModel
impl UnwindSafe for TreeAdditiveCostModel
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more