in reply to Re^3: algorithm for 'best subsets'
in thread algorithm for 'best subsets'
Given two numeric keys for vertices in a graph, the UnionFind "union" operation creates an edge joining them and returns one of the two keys as a master key to the joined vertex set. What I am doing with %union_data is supplementing the algorithm -- under each master key, there is a bit-vector with the union of all bits that are true in any member of the joined set.
In my implementation, the vertices are item numbers, so the key to %union_data is a subset of the item numbers. The binary values are bit vectors: bit [k] is true if keyword[k] is in the set.
This allows me to extend the partition easily by testing each new item against the joined sets that have already been built.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^5: algorithm for 'best subsets'
by BrowserUk (Patriarch) on Mar 04, 2005 at 21:11 UTC | |
by tall_man (Parson) on Mar 04, 2005 at 22:05 UTC | |
by BrowserUk (Patriarch) on Mar 04, 2005 at 23:27 UTC | |
by tall_man (Parson) on Mar 04, 2005 at 23:35 UTC | |
by BrowserUk (Patriarch) on Mar 05, 2005 at 00:09 UTC | |
by BrowserUk (Patriarch) on Mar 08, 2005 at 01:19 UTC |