javax.constraints.impl.search
Class AbstractSearchStrategy

java.lang.Object
  extended by javax.constraints.impl.CommonBase
      extended by javax.constraints.impl.search.AbstractSearchStrategy
All Implemented Interfaces:
SearchStrategy
Direct Known Subclasses:
Goal, StrategyLogVar, StrategyLogVariables

public abstract class AbstractSearchStrategy
extends CommonBase
implements SearchStrategy


Nested Class Summary
 
Nested classes/interfaces inherited from interface javax.constraints.SearchStrategy
SearchStrategy.SearchStrategyType
 
Constructor Summary
AbstractSearchStrategy(Solver solver)
           
 
Method Summary
 Solver getSolver()
          Returns a solver to which this strategy belongs.
 SearchStrategy.SearchStrategyType getType()
          Returns a type of this Search Strategy
 ValueSelector getValueSelector()
          Returns a value selector that was set for this strategy
 VarReal[] getVarReals()
          Returns a an array of real variables that is in use by this strategy
 Var[] getVars()
          Returns a an array of integer variables that is in use by this strategy
 VarSelector getVarSelector()
          Returns a variable selector that was set for this strategy
 boolean run()
          This method is used by CUSTOM strategies such as SearchStrategyLog to define its execution logic
 void setType(SearchStrategy.SearchStrategyType type)
          Sets a type of this Search Strategy
 void setValueSelector(ValueSelector valueSelector)
          Sets a value selector that may be used (or not) by this strategy
 void setValueSelectorType(ValueSelectorType valueSelectorType)
          Sets a value selector type to be used by this strategy
 void setVarReals(VarReal[] varReals)
          Defines an array of real variables that may be used (or not) by this strategy
 void setVars(Var[] vars)
          Defines an array of integer variables that may be used (or not) by this strategy
 void setVars(VarList vars)
          Defines an array of integer variables that may be used (or not) by this strategy
 void setVars(VarSet[] setVars)
          Defines an array of set variables that may be used (or not) by this strategy.
 void setVarSelector(VarSelector varSelector)
          Sets a variable selector that may be used (or not) by this strategy
 void setVarSelectorType(VarSelectorType varSelectorType)
          Sets a variable selector type to be used by this strategy
 void trace()
          Forces the solver to log information about this strategy every time when it is executed
 
Methods inherited from class javax.constraints.impl.CommonBase
getImpl, getName, getObject, getProblem, setImpl, setName, setObject
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.constraints.SearchStrategy
getImpl, getName, getObject, setImpl, setName, setObject
 

Constructor Detail

AbstractSearchStrategy

public AbstractSearchStrategy(Solver solver)
Method Detail

getSolver

public Solver getSolver()
Description copied from interface: SearchStrategy
Returns a solver to which this strategy belongs.

Specified by:
getSolver in interface SearchStrategy
Returns:
a solver to which this strategy belongs.

getType

public SearchStrategy.SearchStrategyType getType()
Description copied from interface: SearchStrategy
Returns a type of this Search Strategy

Specified by:
getType in interface SearchStrategy
Returns:
SearchStrategyType

getValueSelector

public ValueSelector getValueSelector()
Description copied from interface: SearchStrategy
Returns a value selector that was set for this strategy

Specified by:
getValueSelector in interface SearchStrategy

getVarReals

public VarReal[] getVarReals()
Description copied from interface: SearchStrategy
Returns a an array of real variables that is in use by this strategy

Specified by:
getVarReals in interface SearchStrategy

getVars

public Var[] getVars()
Description copied from interface: SearchStrategy
Returns a an array of integer variables that is in use by this strategy

Specified by:
getVars in interface SearchStrategy

getVarSelector

public VarSelector getVarSelector()
Description copied from interface: SearchStrategy
Returns a variable selector that was set for this strategy

Specified by:
getVarSelector in interface SearchStrategy

run

public boolean run()
This method is used by CUSTOM strategies such as SearchStrategyLog to define its execution logic

Specified by:
run in interface SearchStrategy
Returns:
boolean

setType

public void setType(SearchStrategy.SearchStrategyType type)
Description copied from interface: SearchStrategy
Sets a type of this Search Strategy

Specified by:
setType in interface SearchStrategy

setValueSelector

public void setValueSelector(ValueSelector valueSelector)
Description copied from interface: SearchStrategy
Sets a value selector that may be used (or not) by this strategy

Specified by:
setValueSelector in interface SearchStrategy

setValueSelectorType

public void setValueSelectorType(ValueSelectorType valueSelectorType)
Sets a value selector type to be used by this strategy

Specified by:
setValueSelectorType in interface SearchStrategy
Parameters:
valueSelectorType -

setVarReals

public void setVarReals(VarReal[] varReals)
Description copied from interface: SearchStrategy
Defines an array of real variables that may be used (or not) by this strategy

Specified by:
setVarReals in interface SearchStrategy

setVars

public void setVars(Var[] vars)
Description copied from interface: SearchStrategy
Defines an array of integer variables that may be used (or not) by this strategy

Specified by:
setVars in interface SearchStrategy
Parameters:
vars - an array of integer constrained variables

setVars

public void setVars(VarList vars)
Defines an array of integer variables that may be used (or not) by this strategy

Specified by:
setVars in interface SearchStrategy
Parameters:
vars - a list of integer constrained variables

setVars

public void setVars(VarSet[] setVars)
Defines an array of set variables that may be used (or not) by this strategy. These variables are extracted from the array of set variables passed as a parameter

Specified by:
setVars in interface SearchStrategy
Parameters:
setVars - an array of set variables

setVarSelector

public void setVarSelector(VarSelector varSelector)
Description copied from interface: SearchStrategy
Sets a variable selector that may be used (or not) by this strategy

Specified by:
setVarSelector in interface SearchStrategy

setVarSelectorType

public void setVarSelectorType(VarSelectorType varSelectorType)
Sets a variable selector type to be used by this strategy

Specified by:
setVarSelectorType in interface SearchStrategy
Parameters:
varSelectorType -

trace

public void trace()
Description copied from interface: SearchStrategy
Forces the solver to log information about this strategy every time when it is executed

Specified by:
trace in interface SearchStrategy