00001 package com.graphbuilder.math; 00002 00006 public class AddNode extends OpNode { 00007 00008 public AddNode(Expression leftChild, Expression rightChild) { 00009 super(leftChild, rightChild); 00010 } 00011 00015 public double eval(VarMap v, FuncMap f) { 00016 double a = leftChild.eval(v, f); 00017 double b = rightChild.eval(v, f); 00018 return a + b; 00019 } 00020 00021 public String getSymbol() { 00022 return "+"; 00023 } 00024 }