STAPL API Reference          
Overview   Containers   Algorithms   Views   Skeletons   Run-Time System
Modules     Classes    
List of all members | Classes | Public Member Functions | Public Types
stapl::balance_neighbor_partitions_wf< Weight_property, Weight_partition_map > Struct Template Reference

Work function to balance 2 neighboring partitions in a diffusive fashion according to the independent set. More...

Classes

struct  add_partition_weight
 Increment partition weight with a weight. More...
 
struct  check_contains
 Helper functor which calls contains on a vertex in a graph with passed descriptor as parameter. More...
 
struct  edge_cut_cmp
 Compare edge-cut of 2 vertices. More...
 
struct  is_source
 Return true if the 'elt' edge has 'source' as source. More...
 
struct  is_target
 Return true if the 'elt' edge has 'target' as target. More...
 

Public Member Functions

 balance_neighbor_partitions_wf (Weight_property const &prop, Weight_partition_map const &prop2, indep_edge_set_type const &indep, size_t const &tol)
 
template<typename Elt , typename HView >
void operator() (Elt p1, HView hview)
 
template<typename HView , typename P1 , typename D >
void move_vertices (HView hview, P1 p1, D const &d, int weight)
 Balance 2 neighboring partitions in a diffusive fashion. More...
 

Public Types

typedef std::vector< std::pair< size_t, size_t > > indep_edge_set_type
 
typedef void result_type
 

Detailed Description

template<typename Weight_property, typename Weight_partition_map>
struct stapl::balance_neighbor_partitions_wf< Weight_property, Weight_partition_map >

Work function to balance 2 neighboring partitions in a diffusive fashion according to the independent set.

Template Parameters
Weight_propertyvertex property map type.
Weight_partition_mappartition property map type.

Constructor & Destructor Documentation

◆ balance_neighbor_partitions_wf()

template<typename Weight_property , typename Weight_partition_map >
stapl::balance_neighbor_partitions_wf< Weight_property, Weight_partition_map >::balance_neighbor_partitions_wf ( Weight_property const &  prop,
Weight_partition_map const &  prop2,
indep_edge_set_type const &  indep,
size_t const &  tol 
)
Parameters
propvertex property map.
prop2partition property map.
indepindependent sets of partitions.
tolvertex weight imbalance allowed.

Member Function Documentation

◆ operator()()

template<typename Weight_property , typename Weight_partition_map >
template<typename Elt , typename HView >
void stapl::balance_neighbor_partitions_wf< Weight_property, Weight_partition_map >::operator() ( Elt  p1,
HView  hview 
)
Parameters
p1partition considered as a source of vertices.
hviewpartition view.

◆ move_vertices()

template<typename Weight_property , typename Weight_partition_map >
template<typename HView , typename P1 , typename D >
void stapl::balance_neighbor_partitions_wf< Weight_property, Weight_partition_map >::move_vertices ( HView  hview,
P1  p1,
D const &  d,
int  weight 
)

Balance 2 neighboring partitions in a diffusive fashion.

Parameters
hviewpartition view.
p1overweighted partition.
ddescriptor of adjacent vertex.
weighttotal weight to move if possible to even partitions.

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