aima.search.csp
Class Assignment

java.lang.Object
  extended by aima.search.csp.Assignment

public class Assignment
extends java.lang.Object


Constructor Summary
Assignment()
           
Assignment(java.util.List<java.lang.String> variables)
           
 
Method Summary
 Assignment copy()
           
 java.lang.Object getAssignment(java.lang.String variable)
           
 java.util.List<java.lang.String> getConflictedVariables(Constraint constraint)
           
 java.lang.Object getMinimumConflictingValueFor(java.lang.String conflictedVariable, java.util.List domain, Constraint constraint)
           
 int getNumberOfConflictsFor(java.lang.String conflictedVariable, java.lang.Object value, Constraint constraint)
           
 java.util.List<java.lang.String> getVariables()
           
 boolean hasAssignmentFor(java.lang.String variable)
           
 boolean isComplete()
           
 void remove(java.lang.String variable)
           
 boolean satisfies(Constraint constraint)
           
 java.lang.String selectFirstUnassignedVariable()
           
 void setAssignment(java.lang.String variable, java.lang.Object value)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Assignment

public Assignment()

Assignment

public Assignment(java.util.List<java.lang.String> variables)
Method Detail

setAssignment

public void setAssignment(java.lang.String variable,
                          java.lang.Object value)

getAssignment

public java.lang.Object getAssignment(java.lang.String variable)

isComplete

public boolean isComplete()

remove

public void remove(java.lang.String variable)

selectFirstUnassignedVariable

public java.lang.String selectFirstUnassignedVariable()

hasAssignmentFor

public boolean hasAssignmentFor(java.lang.String variable)

toString

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

copy

public Assignment copy()

getNumberOfConflictsFor

public int getNumberOfConflictsFor(java.lang.String conflictedVariable,
                                   java.lang.Object value,
                                   Constraint constraint)

getConflictedVariables

public java.util.List<java.lang.String> getConflictedVariables(Constraint constraint)

getMinimumConflictingValueFor

public java.lang.Object getMinimumConflictingValueFor(java.lang.String conflictedVariable,
                                                      java.util.List domain,
                                                      Constraint constraint)

satisfies

public boolean satisfies(Constraint constraint)

getVariables

public java.util.List<java.lang.String> getVariables()