double function ( ) { return durations . stream ( ) . mapToDouble ( t -> t ) . sorted ( ) . sum ( ) ; }
compute the total duration note : the sum function implements kahan summation algorithm concode_field_sep List<Double> durations concode_elem_sep List<Vector> controls concode_field_sep Vector getControl concode_elem_sep double getDuration concode_elem_sep int size concode_elem_sep void addControl concode_elem_sep String toString concode_elem_sep void append