[][src]Trait ddo::core::abstraction::dp::Relaxation

pub trait Relaxation<T> {
    fn merge_nodes(&self, nodes: &[Node<T>]) -> Node<T>;

    fn estimate_ub(&self, _state: &T, _info: &NodeInfo) -> i32 { ... }
}

This is the second most important abstraction that a client should provide when using this library. It defines the relaxation that may be applied to the given problem. In particular, the merge_nodes method from this trait defines how the nodes of a layer may be combined to provide an upper bound approximation standing for an arbitrarily selected set of nodes.

Again, the type parameter <T> denotes the type of the states.

Required methods

fn merge_nodes(&self, nodes: &[Node<T>]) -> Node<T>

This method merges the given set of nodes into a new inexact node. The role of this method is really to only provide an inexact node to use as a replacement for the selected nodes. It is the MDD that takes care of maintaining a cutset.

Loading content...

Provided methods

fn estimate_ub(&self, _state: &T, _info: &NodeInfo) -> i32

This optional method derives a rough upper bound on the maximum value reachable by passing through the node characterized by the given state and node info.

Loading content...

Implementors

Loading content...