00001 package com.graphbuilder.math; 00002 00006 public class VarNode extends TermNode { 00007 00008 public VarNode(String name, boolean negate) { 00009 super(name, negate); 00010 } 00011 00015 public double eval(VarMap v, FuncMap f) { 00016 double val = v.getValue(name); 00017 00018 if (negate) val = -val; 00019 00020 return val; 00021 } 00022 }