$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
From: Eric Lemings (lemings_at_[hidden])
Date: 2006-07-28 17:57:57
Greetings,
I'm trying to come up with an algorithm that will "collapse" a sequence
of integer constants by adding like elements together. For example,
typedef vector_c< int, 1,1,1,3,5,5,7,10,10 > input;
would become:
typedef vector_c< int, 3, 3, 10, 7, 20 > result;
You can assume the sequence is already sorted. Would appreciate any
tips.
Thanks,
Eric.