refactors Problem, adds Solution

This commit is contained in:
2019-02-15 13:46:39 +01:00
parent 4b21fd873b
commit 4bc04bd7e3
2 changed files with 38 additions and 51 deletions

View File

@@ -5,20 +5,19 @@ extern crate cookbook;
use std::time;
use std::fmt::Debug;
use std::fmt::Display;
use std::hash::Hash;
use cookbook::*;
use planner::{
*, Value,
solver::{
Variables,
Solution,
Domain,
Problem
}
};
fn pretty_output<K: Eq + Hash + Debug>(res: &Variables<Value, K>) -> String {
fn pretty_output<K: Eq + Hash + Debug>(res: &Solution<Value, K>) -> String {
let mut repr = String::new();
for (var,value) in res {
let value = match value {