Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^4: Out of Memory when generating large matrix

by LanX (Saint)
on Mar 06, 2018 at 13:42 UTC ( [id://1210404]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Out of Memory when generating large matrix
in thread Out of Memory when generating large matrix

> counting unique elements

What is that supposed to mean?

The elements are by definition unique IFF their count is one!

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Wikisyntax for the Monastery

  • Comment on Re^4: Out of Memory when generating large matrix

Replies are listed 'Best First'.
Re^5: Out of Memory when generating large matrix
by Anonymous Monk on Mar 06, 2018 at 14:17 UTC

    It was supposed to mean that a count is obtained for each of the (unique) element in a set. (Not the number of unique elements.) It doesn't really matter though, what is important is that a set on unique elements has to be constructed.

    Constructing a set of unique elements is the same (algorithmically) as sorting, with the proviso that an ordered comparison function is available (i.e. set can be ordered). If only compare for equality is available, the construction becomes O(n*n).

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1210404]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2024-04-18 01:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found