Class TaskReplication


public class TaskReplication extends LqnDecisionVariable
Optimize the replication (fan-out replicas) of an LQN Task (integer). Mirrors native-Python TaskReplication.
  • Constructor Details

    • TaskReplication

      public TaskReplication(Task task, int minValue, int maxValue)
    • TaskReplication

      public TaskReplication(String taskName, int minValue, int maxValue)
    • TaskReplication

      public TaskReplication(String taskName, int minValue, int maxValue, String name)
  • Method Details

    • getBounds

      public double[][] getBounds()
      Description copied from class: DecisionVariable
      Bounds per encoded dimension, each {low, high}. Standard is {0,1}.
      Specified by:
      getBounds in class DecisionVariable
    • decode

      public Object decode(double[] x)
      Description copied from class: DecisionVariable
      Decode the encoded slice (length DecisionVariable.getDimension()) to a value.
      Specified by:
      decode in class DecisionVariable
    • applyLqn

      public void applyLqn(LayeredNetwork model, Object value)
      Description copied from class: LqnDecisionVariable
      Apply a decoded value to a (copied) LayeredNetwork model.
      Specified by:
      applyLqn in class LqnDecisionVariable
    • getVariableType

      public String getVariableType()
      Description copied from class: DecisionVariable
      Type identifier used by decomposition and the gradient dispatcher.
      Specified by:
      getVariableType in class DecisionVariable
    • getLayer

      public List<String> getLayer(Object model)
      Description copied from class: DecisionVariable
      LQN layer name(s) this variable perturbs, or null for flat-network variables. Used by layer freezing (both explicit frozen_layers and adaptive auto_freeze): a variable whose layer set intersects the frozen set is held fixed. The model argument is the LayeredNetwork the variable is applied to. LQN variable subclasses override this.
      Overrides:
      getLayer in class DecisionVariable
    • currentValue

      public Object currentValue(Object model)
      Description copied from class: DecisionVariable
      The variable's current (decoded) value in the given model, or null. Used by layer freezing to hold a variable at the model's existing parameter value. Flat and non-introspectable variables return null. LQN variable subclasses override this.
      Overrides:
      currentValue in class DecisionVariable