Trait egg::LpCostFunction

source ·
pub trait LpCostFunction<L: Language, N: Analysis<L>> {
    // Required method
    fn node_cost(&mut self, egraph: &EGraph<L, N>, eclass: Id, enode: &L) -> f64;
}
Available on crate feature lp only.
Expand description

A cost function to be used by an LpExtractor.

Required Methods§

source

fn node_cost(&mut self, egraph: &EGraph<L, N>, eclass: Id, enode: &L) -> f64

Returns the cost of the given e-node.

This function may look at other parts of the e-graph to compute the cost of the given e-node.

Implementors§