I wonder about the recommended way to map data associated to the edges of a graph calculated by a dynamic algorithm. In the tutorial section the basic dynamic algorithm saves its data regarding to the edges in a HashMap<String, (DataType)>. But I wonder if it’s maybe better to save the data right at the edge with setAttribute(String key, Object ... values) in terms of performance.
Besides I wanted to implement an algorithm, which stores some values for the edges of a graph. These values only change at adding/deleting an edge. Thus I thought of a dynamic algorithm that extends SinkAdapter. And I thought of the initiation step just calling edgeAdded() for each existing edge, but I wonder about the computation step. Actually it would be blank then, and therefore I wondered if it would maybe be better to implement this not as an Algorithm but a special graph with a certain Attribute on the edges. But this would be not rly as comfortable as just using an algorithm and register any Graph there. Leaving compute() blank is maybe no problem, but I feel like this is suboptimal, maybe im missing something. Help is appreciated.