STAPL API Reference          
Overview   Containers   Algorithms   Views   Skeletons   Run-Time System
Modules     Classes    
List of all members | Public Member Functions | Public Types | Public Attributes
stapl::properties::bc_property Struct Reference

Vertex property for use with betweenness_centrality(). Set of properties for each vertex, distance, delta, sigma, list of parent vertices, and a marker for BFS visitation. More...

Public Member Functions

void initialize (size_t num_sources)
 Initializes member properties and allocates space for a given number of sources.
 
void reset_sources (void)
 Resets member properties before calculating next set of sources.
 
delta_type BC (void) const
 
void BC (delta_type bc)
 
dist_type distance (vd_type source_id) const
 
dist_type max_distance () const
 
void distance (vd_type source_id, dist_type dist)
 Sets the distance of vertex from source to the value dist. Also adds the source id to list of sources at level=dist.
 
delta_type delta (vd_type source_id) const
 
void delta (vd_type source_id, delta_type delta)
 
sigma_type sigma (vd_type source_id) const
 
void sigma (vd_type source_id, sigma_type sigma)
 
const bfs_dag_type bfs_dag (vd_type source_id) const
 
void bfs_dag (vd_type source_id, vd_type p_id, sigma_type sig)
 Appends vertex to bfs dag if it is not already in the bfs dag and increments sigma value. More...
 
const level_type level_sources (dist_type level) const
 Returns a list of sources that are on the same level (i.e. distance away from this vertex). Used in calculating delta, where delta is recursively defined starting from last level. More...
 
vd_type next_active_traversal (void)
 Gets the next active source id and removes it from the list.
 
bool is_active (void) const
 Checks if there are any active sources left to process.
 
void set_active (vd_type source_id)
 Adds a source id to the list of active sources. More...
 
void set_pending (vd_type source_id)
 Adds a source id to the list of pending sources to be worked on the next level of mssp. More...
 
void push_pending (void)
 Clears the finished list of active sources worked on and sets the pending sources to be worked on next level. More...
 

Public Types

typedef size_t vd_type
 
typedef size_t dist_type
 
typedef double sigma_type
 
typedef double delta_type
 
typedef std::vector< vd_type > bfs_dag_type
 
typedef std::vector< vd_type > level_type
 
typedef std::vector< dist_type > distances_t
 
typedef std::vector< sigma_type > sigmas_t
 
typedef std::vector< delta_type > deltas_t
 
typedef std::vector< bfs_dag_type > bfs_dags_t
 
typedef std::deque< vd_type > active_t
 
typedef std::vector< level_type > levels_t
 

Public Attributes

delta_type m_BC
 
distances_t m_distances
 
sigmas_t m_sigmas
 
deltas_t m_deltas
 
bfs_dags_t m_bfs_dags
 
active_t m_active1
 
active_t m_active2
 
bool m_active_flip
 
levels_t m_levels
 

Detailed Description

Vertex property for use with betweenness_centrality(). Set of properties for each vertex, distance, delta, sigma, list of parent vertices, and a marker for BFS visitation.

Member Function Documentation

◆ bfs_dag()

void stapl::properties::bc_property::bfs_dag ( vd_type  source_id,
vd_type  p_id,
sigma_type  sig 
)

Appends vertex to bfs dag if it is not already in the bfs dag and increments sigma value.

Parameters
source_idSource id of currently active source
p_idNumeric id of parent vertex
sigSigma value of parent vertex

◆ level_sources()

const level_type stapl::properties::bc_property::level_sources ( dist_type  level) const

Returns a list of sources that are on the same level (i.e. distance away from this vertex). Used in calculating delta, where delta is recursively defined starting from last level.

Parameters
levelLevel is equal to distance from source to this vertex.
See also
dependency_wf

◆ set_active()

void stapl::properties::bc_property::set_active ( vd_type  source_id)

Adds a source id to the list of active sources.

See also
mssp_wf

◆ set_pending()

void stapl::properties::bc_property::set_pending ( vd_type  source_id)

Adds a source id to the list of pending sources to be worked on the next level of mssp.

See also
mssp_wf

◆ push_pending()

void stapl::properties::bc_property::push_pending ( void  )

Clears the finished list of active sources worked on and sets the pending sources to be worked on next level.

See also
mssp_lsync
post_execute

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