Class InitialDomain


public class InitialDomain extends DomainHint
A hint that indicates a good initial search space
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final xal.extension.solver.hint.VariableDomain
     
    static final String
     
    protected final Map<Variable,xal.extension.solver.hint.VariableDomain>
     

    Fields inherited from class xal.extension.solver.hint.DomainHint

    LOWER_IND, UPPER_IND

    Fields inherited from class xal.extension.solver.hint.Hint

    label
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
     
    Constructor
     
    InitialDomain(double defaultLowerLimit, double defaultUpperLimit)
    Simple range constructor with the specified range limits for each variable
    protected
    InitialDomain(xal.extension.solver.hint.VariableDomain domain)
    Primary Constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addFractionRange(Variable variable, double fraction)
    add the initial fraction range for the specified variable
    void
    addRange(Variable variable, double lowerLimit, double upperLimit)
    add the initial range for the specified variable
    getFractionalDomainHint(double fraction)
    Get an initial domain hint whose range for each variable is the specified fraction of the variable's limits.
    double[]
    getRange(Variable variable)
    Get the domain for the specified variable.
    Get the type identifier of this Hint which will be used to fetch this hint in a table of hints.
    boolean
    Determine if there is an entry for the variable

    Methods inherited from class xal.extension.solver.hint.Hint

    getLabel

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • TYPE

      public static final String TYPE
      See Also:
    • variableDomains

      protected final Map<Variable,xal.extension.solver.hint.VariableDomain> variableDomains
    • defaultDomain

      protected final xal.extension.solver.hint.VariableDomain defaultDomain
  • Constructor Details

    • InitialDomain

      protected InitialDomain(xal.extension.solver.hint.VariableDomain domain)
      Primary Constructor
    • InitialDomain

      public InitialDomain(double defaultLowerLimit, double defaultUpperLimit)
      Simple range constructor with the specified range limits for each variable
    • InitialDomain

      public InitialDomain()
      Constructor
  • Method Details

    • getFractionalDomainHint

      public static InitialDomain getFractionalDomainHint(double fraction)
      Get an initial domain hint whose range for each variable is the specified fraction of the variable's limits.
    • getType

      public String getType()
      Get the type identifier of this Hint which will be used to fetch this hint in a table of hints. Subclasses should override this method to return a unique string identifying the hint.
      Specified by:
      getType in class Hint
      Returns:
      the unique type identifier of this Hint
    • hasVariable

      public boolean hasVariable(Variable variable)
      Determine if there is an entry for the variable
      Specified by:
      hasVariable in class DomainHint
    • addRange

      public void addRange(Variable variable, double lowerLimit, double upperLimit)
      add the initial range for the specified variable
    • addFractionRange

      public void addFractionRange(Variable variable, double fraction)
      add the initial fraction range for the specified variable
    • getRange

      public double[] getRange(Variable variable)
      Get the domain for the specified variable.
      Specified by:
      getRange in class DomainHint