OPAL (Object Oriented Parallel Accelerator Library) 2024.2
OPAL
SocialNetworkGraph< TopoDiscoveryStrategy_t > Class Template Reference

#include <SocialNetworkGraph.h>

Inherits TopoDiscoveryStrategy_t.

Collaboration diagram for SocialNetworkGraph< TopoDiscoveryStrategy_t >:

Public Member Functions

std::set< size_t > execute (size_t numMasters, size_t dimensions, size_t id, int)

Private Member Functions

void setNetworkNeighbors ()
double manhattenDistance (size_t from, size_t to)
void chooseRandomNeighbor ()

Private Attributes

boost::random::mt19937 gen_
double alpha_
size_t numMasters_
size_t dim_
size_t myID_
size_t randomNeighbor_
std::set< size_t > realNetworkNeighborPIDs_

Detailed Description

template<class TopoDiscoveryStrategy_t>
class SocialNetworkGraph< TopoDiscoveryStrategy_t >

Definition at line 48 of file SocialNetworkGraph.h.

Member Function Documentation

◆ chooseRandomNeighbor()

template<class TopoDiscoveryStrategy_t>
void SocialNetworkGraph< TopoDiscoveryStrategy_t >::chooseRandomNeighbor ( )
inlineprivate

compute random neighbor using power law distribution with \( \alpha = 2\).

Definition at line 131 of file SocialNetworkGraph.h.

References alpha_, gen_, manhattenDistance(), myID_, numMasters_, randomNeighbor_, and sum().

Referenced by execute().

Here is the call graph for this function:

◆ execute()

template<class TopoDiscoveryStrategy_t>
std::set< size_t > SocialNetworkGraph< TopoDiscoveryStrategy_t >::execute ( size_t numMasters,
size_t dimensions,
size_t id,
int  )
inline

Definition at line 52 of file SocialNetworkGraph.h.

References chooseRandomNeighbor(), dim_, myID_, numMasters_, realNetworkNeighborPIDs_, and setNetworkNeighbors().

Here is the call graph for this function:

◆ manhattenDistance()

template<class TopoDiscoveryStrategy_t>
double SocialNetworkGraph< TopoDiscoveryStrategy_t >::manhattenDistance ( size_t from,
size_t to )
inlineprivate

Definition at line 118 of file SocialNetworkGraph.h.

References abs(), numMasters_, and sqrt().

Referenced by chooseRandomNeighbor().

Here is the call graph for this function:

◆ setNetworkNeighbors()

template<class TopoDiscoveryStrategy_t>
void SocialNetworkGraph< TopoDiscoveryStrategy_t >::setNetworkNeighbors ( )
inlineprivate

Definition at line 77 of file SocialNetworkGraph.h.

References myID_, numMasters_, realNetworkNeighborPIDs_, and sqrt().

Referenced by execute().

Here is the call graph for this function:

Member Data Documentation

◆ alpha_

template<class TopoDiscoveryStrategy_t>
double SocialNetworkGraph< TopoDiscoveryStrategy_t >::alpha_
private

Definition at line 68 of file SocialNetworkGraph.h.

Referenced by chooseRandomNeighbor().

◆ dim_

template<class TopoDiscoveryStrategy_t>
size_t SocialNetworkGraph< TopoDiscoveryStrategy_t >::dim_
private

Definition at line 71 of file SocialNetworkGraph.h.

Referenced by execute().

◆ gen_

template<class TopoDiscoveryStrategy_t>
boost::random::mt19937 SocialNetworkGraph< TopoDiscoveryStrategy_t >::gen_
private

Definition at line 67 of file SocialNetworkGraph.h.

Referenced by chooseRandomNeighbor().

◆ myID_

template<class TopoDiscoveryStrategy_t>
size_t SocialNetworkGraph< TopoDiscoveryStrategy_t >::myID_
private

Definition at line 72 of file SocialNetworkGraph.h.

Referenced by chooseRandomNeighbor(), execute(), and setNetworkNeighbors().

◆ numMasters_

template<class TopoDiscoveryStrategy_t>
size_t SocialNetworkGraph< TopoDiscoveryStrategy_t >::numMasters_
private

◆ randomNeighbor_

template<class TopoDiscoveryStrategy_t>
size_t SocialNetworkGraph< TopoDiscoveryStrategy_t >::randomNeighbor_
private

Definition at line 74 of file SocialNetworkGraph.h.

Referenced by chooseRandomNeighbor().

◆ realNetworkNeighborPIDs_

template<class TopoDiscoveryStrategy_t>
std::set<size_t> SocialNetworkGraph< TopoDiscoveryStrategy_t >::realNetworkNeighborPIDs_
private

Definition at line 75 of file SocialNetworkGraph.h.

Referenced by execute(), and setNetworkNeighbors().


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