What's the best way to use the composite pattern for a directed graph? The graph represents the time progress of a software . The nodes are events of the software (for example the starting of an activity). The edges are the activities , and the weight of the edge is the duration of the activity. I've ,for example , two events A and B ,and this relation:
A ----4---> B
It's mean that to complete the event A and starting B , requires 4 mseconds.
Obviously , the graph has the starting node(only outgoing edges) , the intermediate nodes , and the last node (only incoming edges).
Some ideas for the Composite Pattern?