Example #1
0
 private SymbolicTransform(
     BasicSymbolicConstraint constraint,
     SymbolicDeconstructor deconstructor,
     Function outputFunction)
 {
     _constraint    = constraint;
     _deconstructor = deconstructor;
     _output        = outputFunction;
 }
Example #2
0
        public static SymbolicTransform New(
            BasicSymbolicConstraint constraint,
            SymbolMap inputMap,
            Function outputFunction)
        {
            var inputContext = inputMap.GenerateContext();

            if (!outputFunction.ContainsVariables(inputContext))
            {
                throw new InvalidTransformException(
                          $"'{nameof(inputMap)}' contains variable names that do not exist in '{nameof(outputFunction)}'");
            }

            var deconstructor = new SymbolicDeconstructor(inputMap);

            return(new SymbolicTransform(constraint, deconstructor, outputFunction));
        }