[][src]Function ddo::implementation::mdd::config::config_builder

pub fn config_builder<T, PB, RLX>(
    pb: &PB,
    rlx: RLX
) -> ConfigurationBuilder<T, PB, RLX> where
    T: Hash + Eq + Clone,
    PB: Problem<T> + Clone,
    RLX: Relaxation<T> + Clone

This is the function you should use to instantiate a new configuration builder with all defaults heuristics. It should be used as in the following example where one creates an MDD whaving a fixed width strategy.

The advantage of using config_builder over using mdd_builder is simply that it adds readability. config_builder should be used when you intend to use a custom mdd type (ie an hybrid mdd) whereas mdd builder should be used when you want to create an mdd by calling the one of its into_xxx` methods.

Here is an example of how to use the config_builder in order to instanciate an hybrid flat-deep mdd.

Example:

use ddo::implementation::mdd::hybrid::HybridFlatDeep;
let problem = MockProblem;
let relax   = MockRelax;
let config  = config_builder(&problem, relax)
                 .with_max_width(FixedWidth(100))
                 .build();
// This is nothing but an example
let mdd     = HybridFlatDeep::from(config);