partage
Class ComplexInstance.ObjectAgentDNF

java.lang.Object
  extended by partage.ComplexInstance.ObjectAgentDNF
All Implemented Interfaces:
ComplexInstance.LogicalObjectAgentFormula, ComplexInstance.LogicalObjectFormula
Enclosing class:
ComplexInstance

public static class ComplexInstance.ObjectAgentDNF
extends java.lang.Object
implements ComplexInstance.LogicalObjectAgentFormula

A static class representing a propositional logical formula of alloc(o, i) in disjunctive normal form (allows for a more efficient processing of this kind of preferences).

Version:
july 2007
Author:
Sylvain Bouveret

Constructor Summary
ComplexInstance.ObjectAgentDNF()
           
ComplexInstance.ObjectAgentDNF(int[][] _conjunctiveTermsObjects, int[][] _conjunctiveTermsAgents)
           
 
Method Summary
 void addConjunctiveTerm(int[] _conjunctiveTermObjects, int[] _conjunctiveTermAgents)
          Adds a clause to the Disjunctive Normal Form.
 int[] getAgents()
          This methods returns the set of agents concerned by the formula.
 int[][] getConjunctiveTermsAgents()
          Returns the array representation of the Disjunctive Normal Form (agents).
 int[][] getConjunctiveTermsObjects()
          Returns the array representation of the Disjunctive Normal Form (objects).
 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.ObjectAgentDNF

public ComplexInstance.ObjectAgentDNF()

ComplexInstance.ObjectAgentDNF

public ComplexInstance.ObjectAgentDNF(int[][] _conjunctiveTermsObjects,
                                      int[][] _conjunctiveTermsAgents)
Method Detail

getConjunctiveTermsObjects

public int[][] getConjunctiveTermsObjects()
Returns the array representation of the Disjunctive Normal Form (objects).

Returns:
an array of objects representing the DNF

getConjunctiveTermsAgents

public int[][] getConjunctiveTermsAgents()
Returns the array representation of the Disjunctive Normal Form (agents).

Returns:
an array of agents representing the DNF

addConjunctiveTerm

public void addConjunctiveTerm(int[] _conjunctiveTermObjects,
                               int[] _conjunctiveTermAgents)
Adds a clause to the Disjunctive 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:
_conjunctiveTermObjects - the array of objects representing the conjunctive term to add.
_conjunctiveTermAgents - the array of agents 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.

getAgents

public int[] getAgents()
Description copied from interface: ComplexInstance.LogicalObjectAgentFormula
This methods returns the set of agents concerned by the formula.

Specified by:
getAgents in interface ComplexInstance.LogicalObjectAgentFormula
Returns:
the set of agents.

toString

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