Mercurial > hg > jslab
view src/samer/maths/FunctionOfGenerator.java @ 5:b67a33c44de7
Remove some crap, etc
author | samer |
---|---|
date | Fri, 05 Apr 2019 21:34:25 +0100 |
parents | bf79fb79ee13 |
children |
line wrap: on
line source
package samer.maths; public class FunctionOfGenerator implements Generator { Generator g; Function f; public FunctionOfGenerator(Function f, Generator g) { this.f=f; this.g=g; } public double next() { return f.apply(g.next()); } public void next(double [] x) { g.next(x); f.apply(x); } public void dispose() { f.dispose(); g.dispose(); } public String toString() { return f.format(g.toString()); } }