DynamicBin1D bin = new DynamicBin1D();
double[] elements = new double[matrix.rows()];
cern.colt.list.DoubleArrayList values = new cern.colt.list.DoubleArrayList(elements);
for (int column=matrix.columns(); --column >= 0; ) {
matrix.viewColumn(column).toArray(elements); // copy column into values
bin.clear();
bin.addAllOf(values);
for (int i=aggr.length; --i >= 0; ) {
result.set(i, column, aggr[i].apply(bin));
}
}