![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Finding and Displaying Duplicates Topic Summary: Created On: 17-Apr-2003 06:12 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
Hi -
does DXL have any built in functions that will find and display all duplicate entries of a attribute? If it doesn't, then I thought of this approach. 1) Open the module 2) Sort the module's objects in adscending order based on an attribute 3) Compare the first objec to the next. If the objects have duplicate entries in the given attribue, record both object identifiers. If not, move to next object and compare the object after that. 4) Repeat step3 unitl you are done with all the objects in the module. 5) Display the duplicates on the screen How is the pseudo code? Would I use layout DXL for anypart of this job? Thanks, Pelp ------------------------- ![]() ![]() ![]() Edited: 17-Apr-2003 at 06:19 by Pelp |
|
![]() |
|
![]() |
|
If you know all the possible values of the attribute (and there aren't too many), then a better approach might be to use skip lists. Create a skip list for each attribute value. Loop through all the objects in the module, look at the attribute and add the object to the appropriate skip list. Then output the skip lists that have more than one entry.
------------------------- Tony Goodman http://www.smartdxl.com |
|
![]() |
|
![]() |
|
If the attribute can have an unknown value, then I suggest:
Create a new attribute, say "duplicate". Use a skip list with the attribute value as the key and the object as data. Loop through the objects. Do a find on the skip list for the current object's attribute value. If the find is successful then you have a duplicate, so set the duplicate attribute for the current object and for the one that you found in the skip list. ------------------------- Tony Goodman http://www.smartdxl.com |
|
![]() |
|
![]() |
|
Use a LayOut to display information about a particular object. Trying to use LayOut to Filter/Unfilter would be a relative disaster since layout is directly assiciated with the current display set, as would using it to be sensitive to the current Sort criteria (that is, making a reference to "next(obj)" and "previous(obj)"). This does not look like a good job for layout.
As for your algorithm consider the attached pseudo-code. - Louie |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
Finding and Displaying Duplicates
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.