return out;
}
public static void setfancy(ArrayDouble1d from, ArrayDouble1d to, ArrayBoolean1d selection) throws IllegalArgumentException {
if (to.len() != selection.len()) {
throw new IllegalArgumentException();
}
int count = 0;
for (int i = 0; i < selection.len(); i++) {
if (selection.get(i)) { count += 1; }
}
if (from.len() != count) {
throw new IllegalArgumentException();
}
int j = 0;
for (int i = 0; i < selection.len(); i++) {
if (selection.get(i)) {