fr.jussieu.gla.wasa.core
Class TabuList

java.lang.Object
  |
  +--fr.jussieu.gla.wasa.core.TabuList

public class TabuList
extends java.lang.Object

Internally used by Engine for storing Vars marked 'Tabu'.

Version:
$Revision: 1.9 $ $Date: 2002/04/17 15:24:05 $
Author:
Laurent Caillette, Florent Selva

Constructor Summary
TabuList(int capacity)
           
 
Method Summary
 void clear()
          Clears the TabuList.
 boolean contains(Var var)
          Returns true if var is in the TabuList.
 int getCapacity()
           
 int getSize()
          Returns the size of the TabuList.
 Var[] getVars()
          Used by NotifyingAlgorithm for displaying TabuList content.
 void put(Var var)
          Adds var in the TabuList.
 void step()
          Executes one step ( corresponding to the engine step ) on the TabuList, each Var going out of the list after #getsize steps.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TabuList

public TabuList(int capacity)
Method Detail

getCapacity

public int getCapacity()

contains

public boolean contains(Var var)
Returns true if var is in the TabuList.
Returns:
True if var is in the TabuList

getSize

public int getSize()
Returns the size of the TabuList.
Returns:
The size of the TabuList

put

public void put(Var var)
         throws java.lang.CloneNotSupportedException
Adds var in the TabuList.

clear

public void clear()
Clears the TabuList.

step

public void step()
Executes one step ( corresponding to the engine step ) on the TabuList, each Var going out of the list after #getsize steps.

getVars

public Var[] getVars()
Used by NotifyingAlgorithm for displaying TabuList content.
Returns:
An array of Vars where first slots represent most recent TabuList slots.