LgFunction.java

Go to the documentation of this file.
00001 package com.graphbuilder.math.func;
00002 
00006 public class LgFunction implements Function {
00007 
00008     public LgFunction() {}
00009 
00013     public double of(double[] d, int numParam) {
00014         return java.lang.Math.log(d[0]) / java.lang.Math.log(2);
00015     }
00016 
00020     public boolean acceptNumParam(int numParam) {
00021         return numParam == 1;
00022     }
00023 
00024     public String toString() {
00025         return "lg(x)";
00026     }
00027 }

Generated on 5 May 2015 for HPCVIEWER by  doxygen 1.6.1