@@ -0,0 +1,1169 @@
+package net.imagej.ops.fopd;%0A%0Aimport net.imglib2.RandomAccessibleInterval;%0Aimport net.imglib2.type.numeric.RealType;%0A%0A/**%0A * DualVariables holds as many dual variables as needed.%0A * %0A * @author Tim-Oliver Buchholz, University of Konstanz%0A *%0A */%0Apublic class DualVariables%3CT extends RealType%3CT%3E%3E %7B%0A%0A%09private final RandomAccessibleInterval%3CT%3E%5B%5D dualVariables;%0A%0A%09private final int numVariables;%0A%0A%09private final T type;%0A%0A%09public DualVariables(final RandomAccessibleInterval%3CT%3E... dualVariables) %7B%0A%09%09this.dualVariables = dualVariables;%0A%09%09this.numVariables = dualVariables.length;%0A%09%09this.type = dualVariables%5B0%5D.randomAccess().get().copy();%0A%09%09this.type.setZero();%0A%09%7D%0A%0A%09public RandomAccessibleInterval%3CT%3E getDualVariable(final int i) %7B%0A%09%09if (i %3C= numVariables) %7B%0A%09%09%09return dualVariables%5Bi%5D;%0A%09%09%7D else %7B%0A%09%09%09throw new ArrayIndexOutOfBoundsException(%0A%09%09%09%09%09%22Only %22 + numVariables + %22 dual variables are available. Dual variable %22 + i + %22 was requested.%22);%0A%09%09%7D%0A%09%7D%0A%0A%09public T getType() %7B%0A%09%09return this.type.copy();%0A%09%7D%0A%0A%09public int getNumDualVariables() %7B%0A%09%09return this.numVariables;%0A%09%7D%0A%0A%09public RandomAccessibleInterval%3CT%3E%5B%5D getAllDUalVariables() %7B%0A%09%09return this.dualVariables;%0A%09%7D%0A%7D%0A

Add DualVariables.