// create a new scanner that is equivalent to this, but with operation applied to all the objects. private c_scanner apply(c_matrix operation) { c_vector result_scanner = operation.multiply(scanner); c_vector[] result_beacons = new c_vector[beacons.Length]; for (int i = 0; i < beacons.Length; i++) { result_beacons[i] = operation.multiply(beacons[i]); } return(new c_scanner(result_scanner, result_beacons)); }