private static Pattern CreatePerformScalarOperationPattern() { PatternNode node = new PatternNode( new Type[] { typeof(Addition), typeof(Multiplication) }); node.AddChild(new PatternNode(typeof(Scalar))); node.AddChild(new PatternNode(typeof(Scalar))); return(new Pattern(node)); }
private static Pattern CreateDeleteZeroAdditionPattern() { PatternNode node = new PatternNode(typeof(Addition)); node.AddChild(new PatternNode(typeof(Scalar), null, 0)); return(new Pattern(node)); }