<br><br><div class="gmail_quote">2010/2/28 Andrew Kokkalis <span dir="ltr"><<a href="mailto:andrewkokkalis@gmail.com">andrewkokkalis@gmail.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> <div class="gmail_quote"><div class="im"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div> > I'm using them for the process of clustering a huge amount of data<br> > (posts from an aple blog from the last 4-5 years)I'm counting<br> > Euclidean distance between two clusters, which I store in a multi_index<br> > container like the above<br> </div>> [...]<br> <div>> My problem is that I have to count 9500! (! = factorial) distances,<br> > and store them in the multi_index container.<br> <br> </div>I think I'm misunderstanding this: do you mean your container<br> is holding 9500! elements? As 9500! ~ 9*10^33664 this can't possibly<br> be the case.<br></blockquote><div>�</div></div><div>Is it impossible for a container such as the above to hold that much elements?<br>during insertion ram is over 2.4 gb (only for this program).<br><br>I'm running now the program with different parameters and see the number of elements that are stored.<br> </div></div></blockquote><div><br>Obviously it is not factorial! Once again i was wrong and fool!<br>The elements in my container are 46,238,536� (n^2 - n ) / 2� so complexity for storage is O(n^2)<br><br>And the problem is that inserting those few elements into the multi_index container takes almost 9 minutes.<br> As I said before I'm using "<code>std::pair<iterator,bool> insert(const value_type& x);</code>".<br>Is there� a faster way to insert?<br></div></div><br>