From 1c5e38fe69ac8a6decbdd8abe93112f4e3369315 Mon Sep 17 00:00:00 2001 From: Joshua Rahm Date: Fri, 30 Jan 2015 17:11:48 -0700 Subject: added source --- src/ElucideanGraphIterator.java | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/ElucideanGraphIterator.java (limited to 'src/ElucideanGraphIterator.java') diff --git a/src/ElucideanGraphIterator.java b/src/ElucideanGraphIterator.java new file mode 100644 index 0000000..764f780 --- /dev/null +++ b/src/ElucideanGraphIterator.java @@ -0,0 +1,30 @@ +/* */ public class ElucideanGraphIterator extends GraphIterator +/* */ { +/* */ private Graph2D graph; +/* */ +/* */ public ElucideanGraphIterator(Graph2D graph) +/* */ { +/* 12 */ super(-(int)(graph.getWidth() * 1.5D)); +/* 13 */ this.graph = graph; +/* */ } +/* */ public static ElucideanGraphIterator getInstance(Graph2D graph) { +/* 16 */ return new ElucideanGraphIterator(graph); +/* */ } +/* */ public boolean hasMoreTokens() { +/* 19 */ return this.index < this.graph.getWidth() * 1.5D; +/* */ } +/* */ public void onTurn() { +/* 22 */ this.index += this.graph.getXSkip(); +/* */ } +/* */ public double translateIndex(Graph2D graph) { +/* 25 */ return this.index * graph.getXRes() + graph.getWindowRange().getXMin(); +/* */ } +/* */ public double translateNumber(Graph2D graph, double i) { +/* 28 */ return i * graph.getXRes() + graph.getWindowRange().getXMin(); +/* */ } +/* */ } + +/* Location: Modulus.jar + * Qualified Name: ElucideanGraphIterator + * JD-Core Version: 0.6.2 + */ \ No newline at end of file -- cgit