in reply to taking a subset of HoHoA, retaining relative structure?
Probably the first thing I'd do is invert the HoA of the source structure, since the numbers are of primary importance; you won't need the letters ($a, etc.) until constructing the new structure.
So
becomes'I' => { $a => [4,10,200], $b => [75,350], . . .
'I' => { 4 => $a, 10 => $a, 200 => $a, 75 => $b, 350 => $b, . . .
But you didn't say what should happen if a number appears in more than one list, e.g.
'I' => { $a => [10,200], $b => [75,200,350], . . .
Maybe that just won't happen.
More importantly, what should be the behavior if a number is in two different "clusters", e.g.
$interval = 500; 'I' => { $a => [200,500,800], . . .
In this case, 200 and 500 could be a cluster, and 500 and 800 could be a cluster. (Again, maybe this just won't happen.)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: taking a subset of HoHoA, retaining relative structure?
by mdunnbass (Monk) on Oct 18, 2006 at 20:40 UTC |