rir has asked for the wisdom of the Perl Monks concerning the following question:
My data comes in sets of 9 booleans which are named "1" through "9". The operations required:
Be well, rir$state = $prev | $curr | $next; if ( FULL == count_bits( $state ) ) { # unset these bits in other blocks for my $block ( @grid ){ $block &= ~$state; # cache block if appropriate if ( TERMINAL == count_bits( $block) ) { push @feed_thru, $block; }elsif ( FULL == count_bits( $block ) ) { push @propagate, $block; } } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: bit-wise
by Zaxo (Archbishop) on Jul 28, 2006 at 21:52 UTC | |
|
Re: bit-wise
by liverpole (Monsignor) on Jul 28, 2006 at 21:28 UTC | |
|
Re: bit-wise
by imp (Priest) on Jul 28, 2006 at 23:47 UTC |