}
return out;
}
+
+ /**
+ * uses the {@link Bit#combineWith(Bit)} method, does not create a new array,
+ * the result is stored in the first array.
+ *
+ * @author Christian Femers
+ */
+ public static Bit[] combineInto(Bit[] dest, Bit[] addition)
+ {
+ if (dest.length != addition.length)
+ throw new IllegalArgumentException("Bit Arrays were not of equal length.");
+ for (int i = 0; i < addition.length; i++) {
+ dest[i] = dest[i].combineWith(addition[i]);
+ }
+ return dest;
+ }
interface BitOp
{