Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Re: how can I speed up this perl??

by Anonymous Monk
on Nov 24, 2003 at 11:34 UTC ( [id://309498]=note: print w/replies, xml ) Need Help??


in reply to Re: how can I speed up this perl??
in thread how can I speed up this perl??

so how do I access the frequency of each pair using your code?

Replies are listed 'Best First'.
Re: Re: Re: how can I speed up this perl??
by moxliukas (Curate) on Nov 24, 2003 at 11:41 UTC

    You access the data by supplying the hash key. so print $counts{tt}; would print the frequency of tt occurences.

      thanks for your patience moxliukas, but this is what i have been doing, and I dont get a total count, I get a list of presence / absence numbers instead e.g. 00000000000100000000000000010000000000000000001000000000001
        Could you post the code, then, because this ought to be working. A couple quick things to check: you are ++'ing the value (not just setting it to 1 or something).

        ------------
        :Wq
        Not an editor command: Wq
Re: how can I speed up this perl??
by Abigail-II (Bishop) on Nov 24, 2003 at 11:37 UTC
    Do you know what a hash is?

    Abigail

      yes! bur I tried this: and i just get a list of 1's: 11111111111111 I dont get the actual count
      $tt = $freq{tt}; print " tt $tt\n";
        Without seeing the code, it's hard to say what's wrong.

        Abigail

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2024-04-18 02:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found