p3j.simulation.assignments.exhaustive
Class AssignmentEnumerator

java.lang.Object
  extended by p3j.simulation.assignments.exhaustive.AssignmentEnumerator

public class AssignmentEnumerator
extends Object

This class provides all data structures and methods required to enumerate a set of Assignment instances step-by-step. Ensures no assignment is added twice.

Author:
Christina Bohk, Roland Ewald

Method Summary
 void add(Set<p3j.simulation.assignments.exhaustive.Assignment> assignments)
          Adds a set of assignments.
 p3j.simulation.assignments.exhaustive.Assignment getMostProbable()
          Gets the most probable assignment.
 boolean isEmpty()
          Checks if is empty.
 p3j.simulation.assignments.exhaustive.Assignment removeMostProbable()
          Removes the most probable assignment.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isEmpty

public boolean isEmpty()
Checks if is empty.

Returns:
true, if is empty

removeMostProbable

public p3j.simulation.assignments.exhaustive.Assignment removeMostProbable()
Removes the most probable assignment.

Returns:
the most probable assignment, null if there is none

getMostProbable

public p3j.simulation.assignments.exhaustive.Assignment getMostProbable()
Gets the most probable assignment.

Returns:
the most probable assignment

add

public void add(Set<p3j.simulation.assignments.exhaustive.Assignment> assignments)
Adds a set of assignments.

Parameters:
assignments - the assignments


Copyright © 2012. All Rights Reserved.