choco.kernel.model.constraints.cnf
Class Singleton
java.lang.Object
choco.kernel.model.constraints.cnf.ALogicTree
choco.kernel.model.constraints.cnf.Singleton
- All Implemented Interfaces:
- Cloneable
public class Singleton
- extends ALogicTree
- Since:
- 21/12/10
- Author:
- Charles Prud'homme
Methods inherited from class choco.kernel.model.constraints.cnf.ALogicTree |
clone |
TRUE
public static final Singleton TRUE
FALSE
public static final Singleton FALSE
Singleton
protected Singleton(ALogicTree.Type type)
is
public boolean is(ALogicTree.Operator op)
- Description copied from class:
ALogicTree
- Current tree is rooted with the logical operator
op
- Specified by:
is
in class ALogicTree
- Parameters:
op
- operator checked
- Returns:
true
if this
is op
getChildren
public ALogicTree[] getChildren()
- Description copied from class:
ALogicTree
- Returns the array of children of
this
.
null
is a valid return value.
- Specified by:
getChildren
in class ALogicTree
- Returns:
- an array of logic trees,
null
otherwise
flattenBoolVar
public IntegerVariable[] flattenBoolVar()
- Description copied from class:
ALogicTree
- Extracts and returns the flatten array of BoolVar contained in
this
.
WARNING : a variable may appear more than once, redundancy is not checked!
- Specified by:
flattenBoolVar
in class ALogicTree
- Returns:
- array of bool variables
toString
public String toString()
- Overrides:
toString
in class Object
getNbPositiveLiterals
public int getNbPositiveLiterals()
- Description copied from class:
ALogicTree
- Computes and returns the number of positive literals contained in the direct level.
- Specified by:
getNbPositiveLiterals
in class ALogicTree
- Returns:
- number of positive literals
Copyright © 2012. All Rights Reserved.