diff src/samer/units/VecToDouble.java @ 0:bf79fb79ee13

Initial Mercurial check in.
author samer
date Tue, 17 Jan 2012 17:50:20 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/samer/units/VecToDouble.java	Tue Jan 17 17:50:20 2012 +0000
@@ -0,0 +1,17 @@
+package	samer.units;
+import	samer.tools.*;
+import	samer.maths.*;
+import	samer.core.types.*;
+
+public class VecToDouble extends AnonymousTask
+{
+	// Vec			vec;
+	DoubleModel	sig;
+	int				i;
+	double		[] x;
+
+	public VecToDouble(Vec in, int j, DoubleModel out) { sig=out; i=j; x=in.array(); }
+	public DoubleModel	output() { return sig; }
+	public void setIndex(int j) { i=j; }
+	public void run() { sig.set(x[i]); }
+}