graphlab.library.event.handlers
Interface PreWorkHandler<VertexType extends BaseVertex>
- All Known Subinterfaces:
- PreWorkPostWorkHandler<VertexType>
public interface PreWorkHandler<VertexType extends BaseVertex>
Handles prework used by algorithms such as BFS and DFS.
Depending on the application, the user can define custom classes that
implements PreWorkHandler and pass them to algorithms.
- Author:
- Omid Aladini
doPreWork
boolean doPreWork(VertexType fromVertex,
VertexType toVertex)
- Does prework on a vertex of a graph.
- Parameters:
fromVertex
- Reference to the vertex we just leaved.toVertex
- Reference to the vertex which prework will apply on.
- Returns:
- whether the traversal should stop at this point.