}
return out;
}
public static ArrayBoolean1d getfancy(ArrayBoolean1d array, ArrayInteger1d selection) {
ArrayBoolean1d out = new ArrayBoolean1d(selection.len());
for (int i = 0; i < selection.len(); i++) {
int index = selection.get(i);
if (index < 0) {
index = array.len() + index;
}
out.set(i, array.get(index));
}
return out;
}