aboutsummaryrefslogtreecommitdiff
path: root/src/EuclideanGraphIterator.java
diff options
context:
space:
mode:
authorJoshua Rahm <joshua.rahm@colorado.edu>2015-01-30 17:11:48 -0700
committerJoshua Rahm <joshua.rahm@colorado.edu>2015-01-30 17:11:48 -0700
commit1c5e38fe69ac8a6decbdd8abe93112f4e3369315 (patch)
tree926cef8cb76d46862ed2c4ec7028720611e47476 /src/EuclideanGraphIterator.java
downloadModulus3D-1c5e38fe69ac8a6decbdd8abe93112f4e3369315.tar.gz
Modulus3D-1c5e38fe69ac8a6decbdd8abe93112f4e3369315.tar.bz2
Modulus3D-1c5e38fe69ac8a6decbdd8abe93112f4e3369315.zip
added source
Diffstat (limited to 'src/EuclideanGraphIterator.java')
-rw-r--r--src/EuclideanGraphIterator.java30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/EuclideanGraphIterator.java b/src/EuclideanGraphIterator.java
new file mode 100644
index 0000000..a09e2fe
--- /dev/null
+++ b/src/EuclideanGraphIterator.java
@@ -0,0 +1,30 @@
+/* */ public class EuclideanGraphIterator extends GraphIterator
+/* */ {
+/* */ private Graph2D graph;
+/* */
+/* */ public EuclideanGraphIterator(Graph2D graph)
+/* */ {
+/* 12 */ super(-(int)(graph.getWidth() * 1.5D));
+/* 13 */ this.graph = graph;
+/* */ }
+/* */ public static EuclideanGraphIterator getInstance(Graph2D graph) {
+/* 16 */ return new EuclideanGraphIterator(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: EuclideanGraphIterator
+ * JD-Core Version: 0.6.2
+ */ \ No newline at end of file