partage
Class ComplexInstance.ObjectAgentClause

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

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

A static class representing a clause of litterals alloc(o,i) or not(alloc(o,i)).

Version:
july 2007
Author:
Sylvain Bouveret

Constructor Summary
ComplexInstance.ObjectAgentClause(int[] _objects, int[] _agents)
          Constructs a clause of litterals from the two arrays.
 
Method Summary
 int[] getAgents()
          This methods returns the set of agents concerned by the formula.
 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.ObjectAgentClause

public ComplexInstance.ObjectAgentClause(int[] _objects,
                                         int[] _agents)
Constructs a clause of litterals from the two arrays. The ith litteral is alloc(_objects[i], _agents[i]) if these two numbers are positive, and not(alloc(_objects[i], _agents[i]) if they are both negative. If only one among the two is negative, it throws an error.

Parameters:
_objects - the array of objects.
_agents - the array of agents.
Method Detail

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.

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