?
=?ISO-8859-1?Q?Martin_J=F8rgensen?=
Hi,
I'm reading a number of double values from a file. It's a 2D-array:
1 2 3 4 5 6 7
-------------
1 3.2
2 0 2.1
3 9.3
4
5 4.5 etc.etc.
6
I'm looking in my book and can't figure out what is the best to use. I
don't think I need a random access iterator. So I can choose among:
vector, list, deque, set, multiset, map and multimap...
After I have read in all the numbers, I want to find those that are in
the upper 10 percentile group, I think it's called (those 10% of the
numbers that are highest).
So then I would probably need something like:
iter = find(array.begin(), array.end(), (10%-highest-number))
hmm. Then again, no, that seems not right... I have a couple of examples
for storing 1D-arrays in my book. I don't think I have any for storing
2D-arrays and am a bit confused.
Can anyone push me in the right direction?
Best regards
Martin Jørgensen
I'm reading a number of double values from a file. It's a 2D-array:
1 2 3 4 5 6 7
-------------
1 3.2
2 0 2.1
3 9.3
4
5 4.5 etc.etc.
6
I'm looking in my book and can't figure out what is the best to use. I
don't think I need a random access iterator. So I can choose among:
vector, list, deque, set, multiset, map and multimap...
After I have read in all the numbers, I want to find those that are in
the upper 10 percentile group, I think it's called (those 10% of the
numbers that are highest).
So then I would probably need something like:
iter = find(array.begin(), array.end(), (10%-highest-number))
hmm. Then again, no, that seems not right... I have a couple of examples
for storing 1D-arrays in my book. I don't think I have any for storing
2D-arrays and am a bit confused.
Can anyone push me in the right direction?
Best regards
Martin Jørgensen