EqualNode.java

Go to the documentation of this file.
00001 package com.graphbuilder.math;
00002 
00007 public class EqualNode extends OpNode {
00008 
00009     //private final boolean debug = true;
00010     
00011     public EqualNode(Expression leftChild, Expression rightChild) {
00012         super(leftChild, rightChild);
00013     }
00014 
00015     //@Override
00016     public String getSymbol() {
00017         return "==";
00018     }
00019 
00020     //@Override
00021     public double eval(VarMap v, FuncMap f) {
00022         double a = leftChild.eval(v, f);
00023         double b = rightChild.eval(v, f);
00024         if (Double.compare(a, b) == 0)
00025             return 0.0;
00026         else
00027             return 1.0;
00028     }
00029 
00030 }

Generated on 5 May 2015 for HPCVIEWER by  doxygen 1.6.1