STAPL API Reference          
Overview   Containers   Algorithms   Views   Skeletons   Run-Time System
Modules     Classes    
List of all members | Public Member Functions
stapl::kla_detail::kla_visitor< Parent > Class Template Reference

Visitor object that is passed as the second paramter to the vertex operator for KLA algorithms. More...

Public Member Functions

 kla_visitor (Parent const &parent)
 
template<typename NeighborOp >
Parent::template make_wrapped_neighbor_operator< NeighborOp >::type derived_visitor (NeighborOp &&uf) const
 Create a wrapped neighbor operator that will be sent.
 
template<class NeighborOp >
void visit (descriptor_type const &target, NeighborOp &&neighbor_op) const
 Visits the target vertex and apply the provided update functor. More...
 
template<class NeighborOp >
void visit (descriptor_type const &target, NeighborOp &&neighbor_op, default_info) const
 Visits the target vertex and apply the provided update functor, with a given priority. More...
 
template<class Vertex , class NeighborOp >
void visit_all_edges (Vertex source, NeighborOp &&neighbor_op) const
 Visits all neighbors of the provided source vertex and applies the provided update functor on each of them. More...
 
template<class Vertex , class NeighborOp , typename VisitPredicate >
void visit_all_edges_if (Vertex &&source, NeighborOp &&neighbor_op, VisitPredicate &&pred) const
 Visits all neighbors of the provided source vertex with a neighbor operator if the edge satisfies a given predicate. More...
 
template<typename V >
std::size_t degree (V &&v) const
 Degree of vertex v.
 
void add_edge (descriptor_type const &source, descriptor_type const &target, edge_property const &ep=edge_property()) const
 Adds an edge between the two given vertices with given property. The edge is added asynchronously and the method returns immediately. More...
 
void delete_edge (descriptor_type const &source, descriptor_type const &target) const
 Deletes the edge between the given source and target vertices. The edge is deleted asynchronously. More...
 
size_t const & level () const
 
size_t const & max_level () const
 

Detailed Description

template<typename Parent>
class stapl::kla_detail::kla_visitor< Parent >

Visitor object that is passed as the second paramter to the vertex operator for KLA algorithms.

Template Parameters
ParentThe vertex_operator_apply class that creates this visitor

Constructor & Destructor Documentation

◆ kla_visitor()

template<typename Parent >
stapl::kla_detail::kla_visitor< Parent >::kla_visitor ( Parent const &  parent)
Parameters
parentA reference to vertex_operator_apply instance.

Member Function Documentation

◆ visit() [1/2]

template<typename Parent >
template<class NeighborOp >
void stapl::kla_detail::kla_visitor< Parent >::visit ( descriptor_type const &  target,
NeighborOp &&  neighbor_op 
) const

Visits the target vertex and apply the provided update functor.

Adds a task on the provided neighboring vertex with the given neighbor-operator.

Parameters
targetThe vertex descriptor of the target vertex to visit.
ufThe neighbor-operator to apply on the target vertex.

◆ visit() [2/2]

template<typename Parent >
template<class NeighborOp >
void stapl::kla_detail::kla_visitor< Parent >::visit ( descriptor_type const &  target,
NeighborOp &&  neighbor_op,
default_info   
) const

Visits the target vertex and apply the provided update functor, with a given priority.

◆ visit_all_edges()

template<typename Parent >
template<class Vertex , class NeighborOp >
void stapl::kla_detail::kla_visitor< Parent >::visit_all_edges ( Vertex  source,
NeighborOp &&  neighbor_op 
) const

Visits all neighbors of the provided source vertex and applies the provided update functor on each of them.

Adds a task on all neighboring vertices with the given neighbor-operator.

Parameters
sourceThe source vertex whose neighbors are being visited.
ufThe neighbor-operator to apply on the target vertex.

◆ visit_all_edges_if()

template<typename Parent >
template<class Vertex , class NeighborOp , typename VisitPredicate >
void stapl::kla_detail::kla_visitor< Parent >::visit_all_edges_if ( Vertex &&  source,
NeighborOp &&  neighbor_op,
VisitPredicate &&  pred 
) const

Visits all neighbors of the provided source vertex with a neighbor operator if the edge satisfies a given predicate.

Parameters
sourceThe source vertex whose neighbors are being visited.
ufThe neighbor-operator to apply on the target vertex.
predThe unary predicate to determine whether an edge should be visited

◆ add_edge()

template<typename Parent >
void stapl::kla_detail::kla_visitor< Parent >::add_edge ( descriptor_type const &  source,
descriptor_type const &  target,
edge_property const &  ep = edge_property() 
) const

Adds an edge between the two given vertices with given property. The edge is added asynchronously and the method returns immediately.

Edge is not guaranteed to be added until after current superstep ends. The edge may be added during the current superstep.

Parameters
sourceDescriptor of the source vertex.
targetDescriptor of the target vertex.
epProperty of the edge.

◆ delete_edge()

template<typename Parent >
void stapl::kla_detail::kla_visitor< Parent >::delete_edge ( descriptor_type const &  source,
descriptor_type const &  target 
) const

Deletes the edge between the given source and target vertices. The edge is deleted asynchronously.

The edge is not guaranteed to have been deleted until after current superstep ends, but may be deleted in the current superstep.

Parameters
sourceDescriptor of the source vertex.
targetDescriptor of the target vertex.

The documentation for this class was generated from the following file: