in reply to Re: Re: Comparing a Multilevel Bill of Materials
in thread Comparing a Multilevel Bill of Materials
A brute force approach is to stringify each part at each level and diff corresponding parts. As usual with brute force methods this could take more memory than you have.
You seem to talking about a flat structure. My second thought is to build the nested structure for both your BoM then walk the trees. I see it as a hash with part# as key and an array of (references to) sub-parts as the value. So, for each part#, check whether it exists, if not add it (initially with an empty value). Add (a ref to) the new part to the parent.
Does this make sense?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Comparing a Multilevel Bill of Materials
by Anonymous Monk on Jun 07, 2002 at 22:24 UTC |