"mp" <mp****@wisc.edu> wrote in message

news:11**********************@g14g2000cwa.googlegr oups.com...

I am doing pairwise comparisons between 2 vectors of chars and

permuting one vector and storing the resulting calculations in a

vector<float> then I find a p-value among other stats. I have to do

1,000,000 permuations for each pair, with a total of 2000 pairs to

compare. Is a vector the appropriate container for such a job? Or is

this a newbie mistake?

Currently I am using a vector of pointers to an object which contains

my pair of vectors and other data members, including 3 vectors which

store 3 different stat calculations (added via push_back() ). This

seems to be a poor choice as my memory usage goes through the roof and

program crashes with more than 80 pairs to compare. I am a bit lost as

what to do? I am not even sure what questions to ask. any ideas would

be appreciated. Thanks, mp

You need to post some code so we can all fully understand your problem,

especially with regard to the memory usage "going through the roof" !

vector<> could well be the right structure to use, since if used

appropriately,

the accessing of elements can be virtually as efficient as using an array.

Again post some code, and we can review it and suggest approaches.

dave