Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Counter - number of tags per interval

by hdb (Monsignor)
on May 04, 2013 at 10:42 UTC ( [id://1032021]=note: print w/replies, xml ) Need Help??


in reply to Counter - number of tags per interval

As a concept:

  • Use strings of 0s and 1s that can be interpreted as binary numbers.
  • In file 1 a  12  15 would become "111100000000000" with 1s on positions 12 to 15 (backwards).
  • All "a" tags in file 2 become on string in a similar fashion "...00110...0010, all "b" tags another etc
  • If you combine the strings from file 1 and file 2 with binary "and", you only need to count the 1s in the result.
I hope I did properly understood your question.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (2)
As of 2024-04-26 00:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found