Ticket #4046 (accepted enhancement)

Opened 8 years ago

Last modified 5 years ago

Add internal property maps

Reported by: gemacke Owned by: gemacke
Priority: normal Milestone: 1.2
Version: 1.0 Severity: normal
Keywords: Cc:


MTGL currently supports only external property maps. It would be very useful to support internal property maps as well. External property maps are intended only to exist temporarily. For instance, a color array used by BFS. Internal property maps are intended to exist for the lifetime of the graph. If vertices or edges are added or deleted, the internal properties for those objects are updated as necessary.

Currently, MTGL uses external property maps where we should be using internal property maps. This causes several problems. First, it requires edges and vertices to have ids. If a user only needs internal properties, then ids are not necessary. Second, it requires edges to be assigned ids based on the order they are given in the sources and dests array passed to init() which requires extra unnecessary storage and extra indirection when accessing edge ids. The reason this is necessary is so that edge properties that exist at graph creation time can still be associated with the correct edge in the graph.

Change History

comment:1 Changed 8 years ago by gemacke

  • Status changed from new to accepted

comment:2 Changed 5 years ago by gemacke

Internal properties were added for the CSR graph in r4026.

Note: See TracTickets for help on using tickets.