Class VariableMap

    • Constructor Detail

      • VariableMap

        public VariableMap​(VariableContextCollection sortedVariables,
                           List<Variable> order,
                           List<Integer> times)
        Initializes a new instance of the VariableMap class.
        Parameters:
        sortedVariables - The sorted variables.
        order - The custom order.
        times - The times associated with the variables in [order]. Each entry can be null.
        Throws:
        NullPointerException - Raised if [sortedVariables] or [order] is null.
        IllegalArgumentException - Raised if the elements in [order] are not found in [sortedVariables].
      • VariableMap

        public VariableMap​(VariableContextCollection sortedVariables,
                           Node[] order)
        Initializes a new instance of the VariableMap class.
        Parameters:
        sortedVariables - The sorted variables.
        order - The custom order, specified by nodes without times. If each node does not contain a single variable, use a different constructor.
        Throws:
        NullPointerException - Raised if [sortedVariables] or [order] is null.
        IllegalArgumentException - Raised if the elements in [order] are not found in [sortedVariables].
    • Method Detail

      • get

        public int get​(int orderIndex)
        Maps between the custom order and the sorted collection.
        Parameters:
        orderIndex - Index of the variable in the custom order.
        Returns:
        The index of the variable in the sorted collection.