Next to the communication methods provided by the cage a vertex also provides methods to communicate with its adjacent vertices.
It is assume that a cage has allready been instantiated and initialised.
- Collect data from all incoming edges:
Vertex vertex = cage.getVertex(0);
std::vector<T_Data> collectData(vertex.nInEdges());
vertex.collect(recvData);
This functionality is also available in the cage: cage.collect(vertex, collectData);
- Spread data to all outgoing edges:
Vertex vertex = cage.getVertex(0);
std::vector<T_Data> spreadData(1, static_cast<T_Data>(1));
v.spread(spreadData);
std::vector<Event> events;
v.spread(sendData, events);
Further Links