partage
Class ComplexInstance.ObjectCNF

java.lang.Object
  extended by partage.ComplexInstance.ObjectCNF
All Implemented Interfaces:
ComplexInstance.LogicalObjectFormula
Enclosing class:
ComplexInstance

public static class ComplexInstance.ObjectCNF
extends java.lang.Object
implements ComplexInstance.LogicalObjectFormula

A static class representing a propositional logical formula of objects in conjunctive normal form (allows for a more efficient processing of this kind of preferences).

Version:
july 2007
Author:
Sylvain Bouveret

Constructor Summary
ComplexInstance.ObjectCNF()
           
ComplexInstance.ObjectCNF(int[][] _clauses)
           
 
Method Summary
 void addClause(int[] _clause)
          Adds a clause to the Conjunctive Normal Form.
 int[][] getClauses()
          Returns the array representation of the Conjunctive Normal Form.
 int[] getObjects()
          This methods returns the set of objects concerned by the formula.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ComplexInstance.ObjectCNF

public ComplexInstance.ObjectCNF()

ComplexInstance.ObjectCNF

public ComplexInstance.ObjectCNF(int[][] _clauses)
Method Detail

getClauses

public int[][] getClauses()
Returns the array representation of the Conjunctive Normal Form.

Returns:
an array representing the CNF

addClause

public void addClause(int[] _clause)
Adds a clause to the Conjunctive Normal Form. A clause is an array of objects (with by convention a minus sign if a specific litteral should be interpreted as negative (the negation of an object).

Parameters:
_clause - the array representing the conjunctive term to add.

getObjects

public int[] getObjects()
Description copied from interface: ComplexInstance.LogicalObjectFormula
This methods returns the set of objects concerned by the formula.

Specified by:
getObjects in interface ComplexInstance.LogicalObjectFormula
Returns:
the set of objects.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object