parser.chocogen
Class RelationFactory

java.lang.Object
  extended by parser.chocogen.ObjectFactory
      extended by parser.chocogen.RelationFactory

public class RelationFactory
extends ObjectFactory

Factory to create relations


Field Summary
 
Fields inherited from class parser.chocogen.ObjectFactory
AC2001, AC2008, AC32, algorithmAC, m, parser
 
Constructor Summary
RelationFactory(Model model, InstanceParser parser)
           
 
Method Summary
static boolean checkEqInCouples(PRelation brel, PDomain[] pdom)
           
static boolean checkNeqInCouples(PRelation brel, PDomain[] pdom)
           
static boolean detectIntensionConstraint(PExtensionConstraint pec)
          Try to recognize if brel (a binary relation only) is : - x = y 0 - x !
 double getCartesianProduct(PRelation prel)
          return the cartesian product of the variables prel holds.
 int[] getMax(PRelation prel)
          return the minimum value of the variables on which prel holds.
 int[] getMin(PRelation prel)
          return the minimum value of the variables on which prel holds.
static int[] getTuple(int val, int arity)
           
static int getVal(int[] bint)
           
 void initializeExtList()
           
 boolean isAllBoolean(PRelation prel)
          return the cartesian product of the variables prel holds.
 boolean isSatDecomposable(PRelation prel)
           
 BinRelation makeBinRelation(PRelation prel)
           
static XmlClause makeClause(int[] cl, int valtest)
           
static void makeClausesEncoding(PRelation prel)
           
static DFA makeDFA(PRelation prel)
           
 LargeRelation makeLargeRelation(PRelation prel)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RelationFactory

public RelationFactory(Model model,
                       InstanceParser parser)
Method Detail

initializeExtList

public void initializeExtList()

makeDFA

public static DFA makeDFA(PRelation prel)

makeLargeRelation

public LargeRelation makeLargeRelation(PRelation prel)

makeBinRelation

public BinRelation makeBinRelation(PRelation prel)

isSatDecomposable

public boolean isSatDecomposable(PRelation prel)

getVal

public static int getVal(int[] bint)

getTuple

public static int[] getTuple(int val,
                             int arity)

makeClausesEncoding

public static void makeClausesEncoding(PRelation prel)

makeClause

public static XmlClause makeClause(int[] cl,
                                   int valtest)

getCartesianProduct

public double getCartesianProduct(PRelation prel)
return the cartesian product of the variables prel holds.

Parameters:
prel -
Returns:

isAllBoolean

public boolean isAllBoolean(PRelation prel)
return the cartesian product of the variables prel holds.

Parameters:
prel -
Returns:

getMin

public int[] getMin(PRelation prel)
return the minimum value of the variables on which prel holds.

Parameters:
prel -
Returns:

getMax

public int[] getMax(PRelation prel)
return the minimum value of the variables on which prel holds.

Parameters:
prel -
Returns:

detectIntensionConstraint

public static boolean detectIntensionConstraint(PExtensionConstraint pec)
Try to recognize if brel (a binary relation only) is : - x = y 0 - x != y 1 - x >= y 2 - x > y 3 - x <= y 4 - x < y 5

Parameters:
pec -

checkEqInCouples

public static boolean checkEqInCouples(PRelation brel,
                                       PDomain[] pdom)

checkNeqInCouples

public static boolean checkNeqInCouples(PRelation brel,
                                        PDomain[] pdom)


Copyright © 2012. All Rights Reserved.