Making Vector Elements Cumulative