Work function to wrap the user provided vertex-operator. More...
Classes | |
struct | make_wrapped_neighbor_operator |
Helper class used to create a wrapped neighbor operator, which may or may not include a copy of the vertex operator, depending on the reinvoke behavior. More... | |
Public Member Functions | |
vertex_operator_apply_base (Graph *g, VertexOp wf, size_t curr_level, size_t max_level, Predicate pred=Predicate()) | |
Vertex Operator Apply Base. More... | |
template<class Vertex > | |
result_type | operator() (Vertex &&v) const |
Function operator that invokes the vertex operator. More... | |
void | increment_level () |
size_t const & | level () const |
size_t const & | max_level () const |
void | increment_iteration (size_t k) |
graph_type *const | graph () const |
Public Types | |
using | graph_type = Graph |
using | derived_type = Derived |
using | vertex_operator_type = VertexOp |
using | frontier_type = Frontier |
using | result_type = std::pair< bool, bool > |
Protected Attributes | |
Graph * | m_graph |
VertexOp | m_wf |
size_t | m_curr_level |
size_t | m_max_level |
Predicate | m_pred |
Work function to wrap the user provided vertex-operator.
The work function is applied on a vertex if the vertex is active. Active vertices may perform some computation and update their values, and may visit their neighboring vertices with the user provided neighbor-operator. Returns true if vertex was active (i.e. the user's work function returned true), false otherwise.
ReinvokeBehavior | Enum to specify under which conditions to reinvoke the vertex operator from the neighor operator vertex is visited with the neighbor operator, the vertex operator will not be invoked on it if its degree exceeds a user-defined threshold. |
Graph | Type of the input graph view. |
VertexOp | Type of the user provided work function. |
Frontier | The type of the frontier |
Derived | vertex_operator_apply class, which uses CRTP to provide certain interfaces (such as hub avoidance) |
Predicate | Type of a predicate work function that recieves a vertex and returns a bool indicating whether or not to terminate. This defaults to a false_predicate which always returns false. |
stapl::kla_detail::vertex_operator_apply_base< ReinvokeBehavior, Graph, VertexOp, Frontier, Derived, Predicate >::vertex_operator_apply_base | ( | Graph * | g, |
VertexOp | wf, | ||
size_t | curr_level, | ||
size_t | max_level, | ||
Predicate | pred = Predicate() |
||
) |
Vertex Operator Apply Base.
wf | vertex operator |
curr_level | The current KLA-level of this visit. |
max_level | The maximum KLA-level of this visit. |
pred | a predicate which recieves a vertex and is used to decide whether to terminate early |
result_type stapl::kla_detail::vertex_operator_apply_base< ReinvokeBehavior, Graph, VertexOp, Frontier, Derived, Predicate >::operator() | ( | Vertex && | v | ) | const |
Function operator that invokes the vertex operator.