internal static UnorderedMapVariableVariable AsUnorderedMapVariableVariable(IDictionary <Variable, Variable> input)
        {
            UnorderedMapVariableVariable inputMap = new UnorderedMapVariableVariable();

            foreach (var element in input)
            {
                inputMap.Add(element.Key, element.Value);
            }
            return(inputMap);
        }
        public Function ReplacePlaceholders(IDictionary <Variable, Variable> placeholderReplacements)
        {
            UnorderedMapVariableVariable unorderedMapVariableVariable = Helper.AsUnorderedMapVariableVariable(placeholderReplacements);

            return(ReplacePlaceholders(unorderedMapVariableVariable));
        }
        /// <summary>
        /// Clones 'this' Function. The parameters of the Function are either cloned, shared or frozen as specified by the parameterCloneMethod argument and
        /// any variable replacements requested are applied in the cloned Function instance.
        /// </summary>
        /// <param name="parameterCloneMethod"></param>
        /// <param name="replacements">existing variables to be replaced with new variables.</param>
        /// <returns></returns>
        public Function Clone(ParameterCloningMethod parameterCloneMethod, IDictionary <Variable, Variable> replacements)
        {
            UnorderedMapVariableVariable replacementVector = Helper.AsUnorderedMapVariableVariable(replacements);

            return(_Clone(parameterCloneMethod, replacementVector));
        }