/** * Copyright (c): Uwe Schmidt, FH Wedel * * You may study, modify and distribute this source code * FOR NON-COMMERCIAL PURPOSES ONLY. * This copyright message has to remain unchanged. * * Note that this document is provided 'as is', * WITHOUT WARRANTY of any kind either expressed or implied. */ public class TraceFunction implements RealFunction { private RealFunction f; public TraceFunction(RealFunction f) { this.f = f; } public double at(double x) { double y = f.at(x); System.out.println( f + " at " + x +"\t= " + y); return y; } public String toString() { return f.toString(); } }