jopt.csp.solution
Class SolutionScope

java.lang.Object
  extended byjopt.csp.solution.SolutionScope
Direct Known Subclasses:
SolverSolution

public class SolutionScope
extends java.lang.Object

A collection of variables that are contained within a solution


Constructor Summary
SolutionScope()
          Creates a new solution request
SolutionScope(SolutionScope scope)
          Creates a new solution request
 
Method Summary
 void add(CspVariable var)
          Adds a variable to record in a solution
 void add(CspVariable[] vars)
          Adds an array of variables to record in a solution
 void clearObjective()
          Clears the objective that was previously set
 boolean contains(CspVariable var)
          Returns true if a variable is contained within the scope of the solution
 CspDoubleExpr getDoubleObjectiveExpression()
          Returns objective double expression
 CspFloatExpr getFloatObjectiveExpression()
          Returns objective float expression
 CspIntExpr getIntObjectiveExpression()
          Returns objective int expression
 CspLongExpr getLongObjectiveExpression()
          Returns objective long expression
 CspNumExpr getObjectiveExpression()
          Returns the objective expression
 boolean isMaximizeObjective()
          Returns true if the objective of this solution is to maximize an expression
 boolean isMinimizeObjective()
          Returns true if the objective of this solution is to minimize an expression
 void remove(CspVariable var)
          Removes a variable from the scope of a solution request
 void setMaximizeObjective(CspNumExpr expr)
          Sets an objective to maximize the specified expression
 void setMinimizeObjective(CspNumExpr expr)
          Sets an objective to minimize the specified expression
 java.util.List variables()
          Returns the list of variables within the scope of the solution
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SolutionScope

public SolutionScope()
Creates a new solution request


SolutionScope

public SolutionScope(SolutionScope scope)
Creates a new solution request

Parameters:
scope - Scope of variables that should be included within request
Method Detail

add

public void add(CspVariable var)
Adds a variable to record in a solution


add

public void add(CspVariable[] vars)
Adds an array of variables to record in a solution


remove

public void remove(CspVariable var)
Removes a variable from the scope of a solution request


contains

public boolean contains(CspVariable var)
Returns true if a variable is contained within the scope of the solution


variables

public java.util.List variables()
Returns the list of variables within the scope of the solution


setMinimizeObjective

public void setMinimizeObjective(CspNumExpr expr)
Sets an objective to minimize the specified expression

Parameters:
expr - Expression that is to be minimized

setMaximizeObjective

public void setMaximizeObjective(CspNumExpr expr)
Sets an objective to maximize the specified expression

Parameters:
expr - Expression that is to be maximized

clearObjective

public void clearObjective()
Clears the objective that was previously set


isMinimizeObjective

public boolean isMinimizeObjective()
Returns true if the objective of this solution is to minimize an expression


isMaximizeObjective

public boolean isMaximizeObjective()
Returns true if the objective of this solution is to maximize an expression


getObjectiveExpression

public CspNumExpr getObjectiveExpression()
Returns the objective expression


getIntObjectiveExpression

public CspIntExpr getIntObjectiveExpression()
Returns objective int expression


getLongObjectiveExpression

public CspLongExpr getLongObjectiveExpression()
Returns objective long expression


getFloatObjectiveExpression

public CspFloatExpr getFloatObjectiveExpression()
Returns objective float expression


getDoubleObjectiveExpression

public CspDoubleExpr getDoubleObjectiveExpression()
Returns objective double expression