omnics.strategy
Class SimpleAssignment

java.lang.Object
  extended by omnics.strategy.AbstractStrategy
      extended by omnics.strategy.SimpleAssignment
All Implemented Interfaces:
java.io.Serializable, AssignmentStrategy, SolverStrategy

public class SimpleAssignment
extends AbstractStrategy
implements AssignmentStrategy

A simple implementation of the AssignmentStrategy that selects the values acording to the domain order.

Author:
Cristian Frasinaru
See Also:
Domain, Serialized Form

Field Summary
 
Fields inherited from class omnics.strategy.AbstractStrategy
solver
 
Constructor Summary
SimpleAssignment()
           
 
Method Summary
 java.lang.Object assign(Var var)
          Returns the value that will be assigned to the specified variable.
 
Methods inherited from class omnics.strategy.AbstractStrategy
getSolver, setSolver
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface omnics.strategy.SolverStrategy
getSolver, setSolver
 

Constructor Detail

SimpleAssignment

public SimpleAssignment()
Method Detail

assign

public java.lang.Object assign(Var var)
Returns the value that will be assigned to the specified variable.

Specified by:
assign in interface AssignmentStrategy
Parameters:
var - a variable from the candidates set
Returns:
the value that will be assigned to var or null if no assignment is possible.