Opened 16 years ago
Last modified 16 years ago
#190 closed task
Standard maps should be reference maps — at Version 1
Reported by: | Peter Kovacs | Owned by: | Alpar Juttner |
---|---|---|---|
Priority: | critical | Milestone: | LEMON 1.1 release |
Component: | core | Version: | hg main |
Keywords: | Cc: | ||
Revision id: |
Description (last modified by )
Should we state in the graph structure concepts that node and arc/edge maps must be reference maps for all graph types?
It would make writing a general algorithm easier and more convenient since we would have to use set()
functions instead of operator[]
only for the "external" map types, and all the "internal" maps, which are created by the algorithm could be used as reference maps.
Maybe it could also improve the efficiency in some cases, but it is not clear and wasn't tested.
Change History (1)
comment:1 Changed 16 years ago by
Description: | modified (diff) |
---|---|
Priority: | major → critical |
Note: See
TracTickets for help on using
tickets.
I checked the graph adaptors and they all conform to this concept, so I see no reason for not adding this restriction to the graph concepts.
What do you think?
If we accept this idea, the following modifications should be made:
set()
and modify them to use the reference map syntax if it is simplier or possibly more efficient (e.g.map[i]++
instead ofmap.set(i, map[i] + 1)
).