| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sat4j.csp.main.SimpleCallback
public class SimpleCallback
| Constructor Summary | |
|---|---|
SimpleCallback()
 | 
|
| Method Summary | |
|---|---|
 void | 
addConstantParameter(String name,
                     int value)
provides a constant value  | 
 void | 
addDomainValue(int v)
add a single value to the current domain  | 
 void | 
addDomainValue(int first,
               int last)
add the range of values [first..last] to the current domain  | 
 void | 
addEffectiveParameter(int value)
add an effective parameter which is a simple variable to the current constraint  | 
 void | 
addEffectiveParameter(String name)
add an effective parameter which is a simple variable to the current constraint  | 
 void | 
addFormalParameter(String name,
                   String type)
add a formal parameter to the current predicate  | 
 void | 
addIntegerItem(int value)
provides an integer value in a parameter list of a constraint  | 
 void | 
addRelationTuple(int[] tuple)
add a single tuple to the current relation  | 
 void | 
addVariable(String name,
            String domain)
callback called to define a new variable  | 
 void | 
addVariableItem(String name)
provides the name of a variable in a parameter list of a constraint  | 
 void | 
addVariableToConstraint(String name)
declares that a variable is in the constraint scope  | 
 void | 
beginConstraint(String name,
                int arity)
callback called at the beginning of the declaration of one constraint  | 
 void | 
beginConstraintsSection(int nbConstraints)
callback called at the beginning of the constraints declarations  | 
 void | 
beginDomain(String name,
            int nbValue)
callback called at the beginning of the declaration of one domain  | 
 void | 
beginDomainsSection(int nbDomains)
callback called at the beginning of the domains declarations  | 
 void | 
beginInstance(String name)
signal the beginning of parsing  | 
 void | 
beginParameterList()
begins the list tag for parameters of a constraint  | 
 void | 
beginPredicate(String name)
callback called at the beginning of the declaration of one predicate  | 
 void | 
beginPredicatesSection(int nbPredicates)
callback called at the beginning of the predicates declarations  | 
 void | 
beginRelation(String name,
              int arity,
              int nbTuples,
              boolean isSupport)
callback called at the beginning of the declaration of one relation  | 
 void | 
beginRelationsSection(int nbRelations)
callback called at the beginning of the relations declarations  | 
 void | 
beginVariablesSection(int nbVariables)
callback called at the beginning of the variables declarations  | 
 void | 
constraintExpression(String expr)
provide the expression of the current constraint as an expression in a syntac chosen by the solver  | 
 void | 
constraintReference(String name)
provide the definition of the current constraint  | 
 void | 
endConstraint()
ends the definition of the current constraint  | 
 void | 
endConstraintsSection()
end the definition of all constraints  | 
 void | 
endDomain()
ends the definition of the current domain  | 
 void | 
endDomainsSection()
end the definition of all domains  | 
 void | 
endInstance()
signal the end of parsing  | 
 void | 
endParamaterList()
ends the list tag for parameters of a constraint  | 
 void | 
endPredicate()
ends the definition of the current predicate  | 
 void | 
endPredicatesSection()
end the definition of all predicates  | 
 void | 
endRelation()
ends the definition of the current relation  | 
 void | 
endRelationsSection()
end the definition of all relations  | 
 void | 
endVariablesSection()
end the definition of all variables  | 
 void | 
predicateExpression(String expression)
provide the expression of the current predicate  | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public SimpleCallback()
| Method Detail | 
|---|
public void beginInstance(String name)
beginInstance in interface ICSPCallbackname - name of the instancepublic void beginDomainsSection(int nbDomains)
beginDomainsSection in interface ICSPCallbacknbDomains - number of domains that will be declared
public void beginDomain(String name,
                        int nbValue)
beginDomain in interface ICSPCallbackname - identifier of the domainnbValue - number of values in the domainpublic void addDomainValue(int v)
addDomainValue in interface ICSPCallbackv - value to add to the domain
public void addDomainValue(int first,
                           int last)
addDomainValue in interface ICSPCallbackfirst - first value to add to the domainlast - last value to add to the domainpublic void endDomain()
endDomain in interface ICSPCallbackpublic void endDomainsSection()
endDomainsSection in interface ICSPCallbackpublic void beginVariablesSection(int nbVariables)
beginVariablesSection in interface ICSPCallbacknbVariables - number of variables that will be declared
public void addVariable(String name,
                        String domain)
addVariable in interface ICSPCallbackname - identifier of the variabledomain - identifier of the variable domainpublic void endVariablesSection()
endVariablesSection in interface ICSPCallbackpublic void beginRelationsSection(int nbRelations)
beginRelationsSection in interface ICSPCallbacknbRelations - number of relations that will be declared
public void beginRelation(String name,
                          int arity,
                          int nbTuples,
                          boolean isSupport)
beginRelation in interface ICSPCallbackname - identifier of the relationarity - arity of the relationnbTuples - number of tuples in the relationisSupport - true if tuples represent support, false if tuples represent
            conflictspublic void addRelationTuple(int[] tuple)
addRelationTuple in interface ICSPCallbacktuple - tuple to add to the relation (contains arity elements)public void endRelation()
endRelation in interface ICSPCallbackpublic void endRelationsSection()
endRelationsSection in interface ICSPCallbackpublic void beginPredicatesSection(int nbPredicates)
beginPredicatesSection in interface ICSPCallbacknbPredicates - number of predicates that will be declaredpublic void beginPredicate(String name)
beginPredicate in interface ICSPCallbackname - identifier of the predicate
public void addFormalParameter(String name,
                               String type)
addFormalParameter in interface ICSPCallbackname - name of the parametertype - type of the parameterpublic void predicateExpression(String expression)
predicateExpression in interface ICSPCallbackexpression - the abstract syntax tree representing the expressionpublic void endPredicate()
endPredicate in interface ICSPCallbackpublic void endPredicatesSection()
endPredicatesSection in interface ICSPCallbackpublic void beginConstraintsSection(int nbConstraints)
beginConstraintsSection in interface ICSPCallbacknbConstraints - number of constraints that will be declared
public void beginConstraint(String name,
                            int arity)
beginConstraint in interface ICSPCallbackname - identifier of the constraintarity - arity of the constraintpublic void constraintReference(String name)
constraintReference in interface ICSPCallbackname - the refererence to the definition of this constraint. May be a
            relation, a predicate or the name of a global constraintpublic void addVariableToConstraint(String name)
addVariableToConstraint in interface ICSPCallbackname - name of the variablepublic void addEffectiveParameter(String name)
addEffectiveParameter in interface ICSPCallbackname - name of the variable passed as parameterpublic void addEffectiveParameter(int value)
addEffectiveParameter in interface ICSPCallbackvalue - name of the variable passed as parameterpublic void constraintExpression(String expr)
constraintExpression in interface ICSPCallbackexpr - the expressionpublic void endConstraint()
endConstraint in interface ICSPCallbackpublic void endConstraintsSection()
endConstraintsSection in interface ICSPCallbackpublic void beginParameterList()
beginParameterList in interface ICSPCallbackpublic void addIntegerItem(int value)
addIntegerItem in interface ICSPCallbackvalue - value of current list itempublic void addVariableItem(String name)
addVariableItem in interface ICSPCallbackname - name of the current list itempublic void endParamaterList()
endParamaterList in interface ICSPCallback
public void addConstantParameter(String name,
                                 int value)
addConstantParameter in interface ICSPCallbackpublic void endInstance()
endInstance in interface ICSPCallback
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||