public class Ibex extends Object
Modifier and Type | Field and Description |
---|---|
static int |
BAD_DOMAIN |
static int |
BAD_POINT |
static int |
CONTRACT |
static int |
DISCRETE_NOT_INSTANCIATED |
static int |
ENTAILED |
static int |
FAIL |
static int |
FALSE |
static int |
FALSE_OR_TRUE |
static int |
FULL_INFLATE |
static int |
INFLATE |
static int |
NOT_BUILT |
static int |
NOT_SIGNIFICANT |
static int |
NOT_STARTED |
static int |
NOTHING |
static double |
RATIO |
static int |
SEARCH_OVER |
static int |
SOLUTION |
static int |
STARTED |
static int |
TRUE |
static int |
UNKNOWN |
static int |
UNKNOWN_POINT |
Constructor and Description |
---|
Ibex(double[] prec)
Create a new Ibex object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add_ctr(String syntax)
Add a new constraint.
|
boolean |
build()
Build the object (with all constraints added via add_ctr(...))
|
int |
contract(int i,
double[] bounds)
Same as contract(int, double bounds[], int reif) with reif=TRUE.
|
int |
contract(int i,
double[] bounds,
int reif)
Call the contractor associated to a constraint or its negation.
|
int |
inflate(int i,
double[] p,
double[] bounds,
boolean in)
Inflate a point to a box with respect to a constraint or its negation.
|
int |
next_solution(double[] sol)
Look up for the next solution.
|
void |
release()
Free IBEX structures from memory
|
int |
start_solve(double[] bounds)
Let IBEX terminates the solving process for the CSP, once all the integer
variables have been instanciated.
|
public static final double RATIO
public static final int FAIL
public static final int ENTAILED
public static final int CONTRACT
public static final int NOTHING
public static final int NOT_SIGNIFICANT
public static final int INFLATE
public static final int FULL_INFLATE
public static final int BAD_POINT
public static final int UNKNOWN_POINT
public static final int STARTED
public static final int DISCRETE_NOT_INSTANCIATED
public static final int UNKNOWN
public static final int SOLUTION
public static final int SEARCH_OVER
public static final int NOT_STARTED
public static final int FALSE
public static final int TRUE
public static final int FALSE_OR_TRUE
public static final int BAD_DOMAIN
public static final int NOT_BUILT
public Ibex(double[] prec)
prec
- - An array of n double (where n is the total number of variables of the CSP).
Each double indicates whether a variable is integral or not, and in the
case of a real variable, the precision required. More precisely:
prec[i]==-1 => the ith variable is integral.
prec[i]>=0 => the ith variable is real and the precision is prec[i].public boolean add_ctr(String syntax)
syntax
- - The constraintpublic boolean build()
public int contract(int i, double[] bounds, int reif)
i
- - Number of the constraint (in the order of creation)bounds
- - The bounds of domains under the following form:
(x1-,x1+,x2-,x2+,...,xn-,xn+), where xi- (resp. xi+) is the
lower (resp. upper) bound of the domain of x_i.reif
- - Domain of the reification variable b with the following accepted values:
FALSE, TRUE, FALSE_OR_TRUE.public int inflate(int i, double[] p, double[] bounds, boolean in)
i
- - Number of the constraint c (in the order of creation)p
- - The coordinates of the point to inflate: (p1,...pn)bounds
- - The bounds of the enclosing box x under the following form:
(x1-,x1+,x2-,x2+,...,xn-,xn+), where xi- (resp. xi+) is the
lower (resp. upper) bound of the domain of x_i.in
- - TRUE if the box has to be inflated inside c (-> inner region),
FALSE if it has to be inflated outside c (-> forbidden region).public int contract(int i, double[] bounds)
public int start_solve(double[] bounds)
bounds
- - the domain in which all solutions will be searched
(include all variables, real and integer ones).public int next_solution(double[] sol)
public void release()
Copyright © 2018. All rights reserved.