choco.cp.solver.constraints.global.geost.layers
Class GeometricKernel

java.lang.Object
  extended by choco.cp.solver.constraints.global.geost.layers.GeometricKernel

public final class GeometricKernel
extends Object

This is the Geometric kernel class. It implements the functionality of the sweep point algorithm.


Constructor Summary
GeometricKernel(Constants c, Setup s, ExternalLayer extrL, IntermediateLayer intermL, boolean memo_, Map<com.sun.tools.javac.util.Pair<Integer,Integer>,Boolean> included_, Solver aSolver, Geost_Constraint aConstraint)
          Creates an ExternalLayer instance for a specific Constants class, a specific Setup class, a specific ExternalLayer class and a specific IntermediateLayer class.
 
Method Summary
static List<Point> circleIntersectiont(double x1, double y1, double r1, double x2, double y2, double r2)
           
 boolean filterCtrs(int k, int[] oIDs, List<ExternalConstraint> ectrs)
          This is the main filtering algorithm associated with the Geost_Constraint.
 boolean fixAllObjs_incr(int k, int[] oIDs, List<ExternalConstraint> ectrs, List<int[]> ctrlVs, IStateInt idxLastFreeObject)
           
 boolean fixAllObjs(int k, int[] oIDs, List<ExternalConstraint> ectrs, List<int[]> ctrlVs, IStateInt idxLastFreeObject)
          Tries to fix all the objects within one single propagation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GeometricKernel

public GeometricKernel(Constants c,
                       Setup s,
                       ExternalLayer extrL,
                       IntermediateLayer intermL,
                       boolean memo_,
                       Map<com.sun.tools.javac.util.Pair<Integer,Integer>,Boolean> included_,
                       Solver aSolver,
                       Geost_Constraint aConstraint)
Creates an ExternalLayer instance for a specific Constants class, a specific Setup class, a specific ExternalLayer class and a specific IntermediateLayer class.

Parameters:
c - The constants class
s - The Setup class
extrL -
aSolver -
aConstraint -
Method Detail

filterCtrs

public boolean filterCtrs(int k,
                          int[] oIDs,
                          List<ExternalConstraint> ectrs)
                   throws ContradictionException
This is the main filtering algorithm associated with the Geost_Constraint.

Parameters:
k - The total number of dimensions (The dimension of the space we are working in)
oIDs - The list of object IDs
ectrs - The list of external constraints
Returns:
It return false if we couldn't prune anything, this means that we sweeped the whole space and couldn't find a placement. This cause a failure of the Geost_Constraint. Otherwise it returns true.
Throws:
ContradictionException

fixAllObjs

public boolean fixAllObjs(int k,
                          int[] oIDs,
                          List<ExternalConstraint> ectrs,
                          List<int[]> ctrlVs,
                          IStateInt idxLastFreeObject)
                   throws ContradictionException
Tries to fix all the objects within one single propagation.

Parameters:
k - The total number of dimensions (The dimension of the space we are working in)
oIDs - The list of object IDs
ectrs - The list of external constraints
ctrlVs - The list of controlling vectors
idxLastFreeObject -
Returns:
It return true if we can fix all the objects. Otherwise it returns false.
Throws:
ContradictionException

fixAllObjs_incr

public boolean fixAllObjs_incr(int k,
                               int[] oIDs,
                               List<ExternalConstraint> ectrs,
                               List<int[]> ctrlVs,
                               IStateInt idxLastFreeObject)
                        throws ContradictionException
Throws:
ContradictionException

circleIntersectiont

public static List<Point> circleIntersectiont(double x1,
                                              double y1,
                                              double r1,
                                              double x2,
                                              double y2,
                                              double r2)


Copyright © 2012. All Rights Reserved.