STAPL API Reference          
Overview   Containers   Algorithms   Views   Skeletons   Run-Time System
Modules     Classes    
List of all members | Classes | Public Member Functions | Public Types | Friends
stapl::partitioner_details::multilevel_vertex_property Class Reference

vertex property for multilevel graph partitioner. More...

Classes

struct  gain_comparator
 Compares the gain of two partitions. Returns true if the first partition has a higher gain. More...
 
struct  pid_comp
 Compares id of partition with a specific partition id. More...
 

Public Member Functions

 multilevel_vertex_property (size_t const &weight=0)
 
multilevel_vertex_property operator+ (multilevel_vertex_property const &rhs) const
 Addition operator with a vertex property. Sums vertex weights of both vertex properties and returns a new vertex property constructed with the vertex weight sum. More...
 
size_t get_weight () const
 
size_t get_partition_id () const
 
size_t get_matched_vertex () const
 
std::vector< std::pair< size_t, size_t > > get_partition_info () const
 
void sort_partition_info ()
 Sort neighboring partitions by decreasing gain.
 
bool is_matched () const
 Returns true if vertex is matched.
 
bool is_maybe_matched () const
 Returns true if vertex is maybe matched.
 
bool is_unmatched () const
 Returns true if vertex is unmatched.
 
size_t get_internal_degree () const
 
bool cannot_move () const
 Returns true if the move of this vertex to another partition will increase the edge-cut.
 
void clear_maybe_matched ()
 Change a MAYBE_MATCHED status to UNMATCHED.
 
void set_weight (size_t const &w)
 
void set_partition_id (size_t const &pid)
 
void update_partition_id (size_t const &pid)
 Update the partition id of the vertex. More...
 
void set_matched_vertex (size_t const &m)
 
void set_matched (char const &m)
 
void set_matched (char const &m, size_t const &id)
 Sets the matching status and the matched vertex. More...
 
void add_partition (std::pair< size_t, size_t > const &p)
 Add neighboring partition id and weight to the vertex. More...
 
void update_partition (size_t const &old_pid, size_t const &new_pid, size_t const &weight)
 Functor updating neighboring partition information of a vertex. More...
 

Public Types

enum  { UNMATCHED, MAYBE_MATCHED, MATCHED }
 

Friends

std::ostream & operator<< (std::ostream &stream, multilevel_vertex_property const &v)
 Print property of this vertex to an output stream. More...
 

Detailed Description

vertex property for multilevel graph partitioner.

Constructor & Destructor Documentation

◆ multilevel_vertex_property()

stapl::partitioner_details::multilevel_vertex_property::multilevel_vertex_property ( size_t const &  weight = 0)
Parameters
weightvertex weight.

Member Function Documentation

◆ operator+()

multilevel_vertex_property stapl::partitioner_details::multilevel_vertex_property::operator+ ( multilevel_vertex_property const &  rhs) const

Addition operator with a vertex property. Sums vertex weights of both vertex properties and returns a new vertex property constructed with the vertex weight sum.

Parameters
rhsvertex property whose vertex weight is added to the vertex weight of this property.
Returns
new vertex property constructed with the vertex weight sum.

◆ update_partition_id()

void stapl::partitioner_details::multilevel_vertex_property::update_partition_id ( size_t const &  pid)

Update the partition id of the vertex.

Parameters
pidnew partition id.

◆ set_matched()

void stapl::partitioner_details::multilevel_vertex_property::set_matched ( char const &  m,
size_t const &  id 
)

Sets the matching status and the matched vertex.

Parameters
mmatching status.
idmatched vertex id.

◆ add_partition()

void stapl::partitioner_details::multilevel_vertex_property::add_partition ( std::pair< size_t, size_t > const &  p)

Add neighboring partition id and weight to the vertex.

Parameters
ppair of partition id and weight.

◆ update_partition()

void stapl::partitioner_details::multilevel_vertex_property::update_partition ( size_t const &  old_pid,
size_t const &  new_pid,
size_t const &  weight 
)

Functor updating neighboring partition information of a vertex.

Parameters
old_pidid of source partition whose weight is subtracted with weight.
new_pidid of target partition whose weight is incremented with weight.
weightweight to be moved.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  stream,
multilevel_vertex_property const &  v 
)
friend

Print property of this vertex to an output stream.

Parameters
streamoutput stream.
vvertex property.
Returns
the output stream stream.

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