org.openl.ie.constrainer.consistencyChecking.Uncovered Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of org.openl.rules.constrainer Show documentation
Show all versions of org.openl.rules.constrainer Show documentation
OpenL Constraint Programming engine
package org.openl.ie.constrainer.consistencyChecking;
import java.util.HashMap;
import org.openl.ie.constrainer.IntExpArray;
import org.openl.ie.constrainer.consistencyChecking.DTChecker.Utils;
/**
*
* Title:
*
*
* Description: Representation of a point in the space of states not covered by any rule
*
*
* Copyright: Copyright (c) 2002
*
*
* Company:
*
*
* @author unascribed
* @version 1.0
*/
public class Uncovered {
protected String[] _solutionNames;
protected int[] _solutionValues;
public Uncovered(IntExpArray array) {
_solutionNames = Utils.IntExpArray2Names(array);
_solutionValues = Utils.IntExpArray2Values(array);
}
public HashMap getSolution() {
HashMap map = new HashMap();
for (int i = 0; i < _solutionNames.length; i++) {
map.put(_solutionNames[i], _solutionValues[i]);
}
return map;
}
public String[] getSolutionNames() {
return _solutionNames;
}
public int[] getSolutionValues() {
return _solutionValues;
}
@Override
public String toString() {
return getSolution().toString();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy