Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Equivalence classes from equivalence relation and fingerprints

by ambrus (Abbot)
on Jan 17, 2007 at 21:19 UTC ( [id://595134]=note: print w/replies, xml ) Need Help??


in reply to Equivalence classes from equivalence relation and fingerprints

Here's tye's solution. It took some time for me to get it through the chatterbox, even though the idea isn't really complicated. It uses a different interface then I do in the parent post.

my %hash; OBJ: for my $obj ( @objects ) { my $fingerprint = $fingerprint{$obj}; my $class = \@{$hash{$fingerprint}} for( @$class ) { if( same($obj,$_->[0] ) { push @$_, $obj; next OBJ: } } push @$class, [ $obj ] }
  • Comment on Re: Equivalence classes from equivalence relation and fingerprints
  • Download Code

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2024-04-20 00:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found