Opened 15 years ago
Closed 15 years ago
#371 closed defect (fixed)
Target graph is not cleared before graph copying
| Reported by: | Peter Kovacs | Owned by: | Peter Kovacs |
|---|---|---|---|
| Priority: | critical | Milestone: | LEMON 1.3 release |
| Component: | core | Version: | hg main |
| Keywords: | Cc: | ||
| Revision id: |
Description (last modified by )
The target graph must be cleared before graph copying. The clear() function must be used in the DigraphCopySelector and GraphCopySelector classes before adding nodes and arcs/edges.
It is a question if build() is required to clear the graph or we should explicitly call clear() before build() for those structures that provides build() function.
Attachments (3)
Change History (8)
comment:1 Changed 15 years ago by
| Description: | modified (diff) |
|---|---|
| Status: | new → assigned |
Changed 15 years ago by
| Attachment: | 371-bugfix-50446fbc0602.patch added |
|---|
Changed 15 years ago by
| Attachment: | 371-test-99be8c4f5a60.patch added |
|---|
Changed 15 years ago by
| Attachment: | 371-test-main-branch-b0fe90eb04d1.patch added |
|---|
comment:2 follow-up: 3 Changed 15 years ago by
comment:3 follow-up: 4 Changed 15 years ago by
Replying to kpeter:
I attached three patches:
- [50446fbc0602] is a bug fix that should be merged into all branches.
- [99be8c4f5a60] extends the test file to check repeated copy as well. It is based on the above patch, it could be merged into all branches, but it is not critical.
I merged these two changesets together as [bb871cb8ac06]. Conceptually, a test should be written even easier than the fix itself.
- [b0fe90eb04d1] contains further improvements for the test file, but it must be rebased on the top of the main branch after merging the above two patches.
Done, see [24b3f18ed9e2].
Is there anything to do with build()?
comment:4 Changed 15 years ago by
Replying to alpar:
Done, see [24b3f18ed9e2].
Thank you.
Is there anything to do with
build()?
I don't think so. Currently, a build() function must clear the graph before building to support copying correctly, but I think, it is a natural request. Now the only graph structure that has a build() function is StaticDigraph, which works correctly.
So the ticket can be closed, as far as I see.
comment:5 Changed 15 years ago by
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |


I attached three patches:
addNode()andaddEdge()/addArc(), butStaticDigraphis built usingbuild()).