STAPL API Reference          
Overview   Containers   Algorithms   Views   Skeletons   Run-Time System
Modules     Classes    
List of all members | Protected Types
stapl::graph< D, M, OptionalParams > Class Template Reference

Parallel static graph container. Inherits all functionality from either undirected_graph or directed_graph.Static graphs do not allow addition or deletion of vertices. The number of vertices must be known at construction. Edges may be added/deleted. Uses directedness selector to inherit from correct directed/undirected base. More...

Public Member Functions

Constructors
 graph (void)
 Creates an empty graph.
 
 graph (size_t const &n)
 Creates a graph with a given size.
 
 graph (size_t const &n, vertex_property const &default_value)
 Creates a graph with a given size and constructs all elements with a default value for vertex property.
 
 graph (partition_type const &ps, vertex_property const &default_value=vertex_property())
 Creates a graph with a given partition and default value for vertex property.
 
 graph (partition_type const &ps, mapper_type const &m)
 Creates a graph with a given partition and mapper.
 
 graph (partition_type const &ps, mapper_type const &m, vertex_property const &default_value)
 Creates a graph with a given partition and mapper, with default value for vertex property.
 
 graph (size_t const &n, mapper_type const &m, vertex_property const &default_value=vertex_property())
 Creates a graph with a given size and mapper, with default value for vertex property. More...
 
template<typename DistSpecsView >
 graph (DistSpecsView const &dist_view, typename std::enable_if< is_distribution_view< DistSpecsView >::value &&!detail::has_is_composed_dist_spec< DistSpecsView >::value >::type *=0)
 
template<typename DistSpecsView >
 graph (DistSpecsView const &dist_view, vertex_property const &default_value, typename std::enable_if< is_distribution_view< DistSpecsView >::value &&!detail::has_is_composed_dist_spec< DistSpecsView >::value >::type *=0)
 
template<typename DP >
 graph (size_t n, vertex_property const &default_value, DP const &dis_policy)
 Creates a graph with a given size and default value where the vertex_property may itself be a parallel container. Required for pC composition. More...
 
template<typename DP >
 graph (size_t n, DP const &dis_policy)
 Creates composed pContainers with a given distribution policy. Required for pC composition. More...
 
template<typename X , typename Y >
 graph (boost::tuples::cons< X, Y > dims)
 Creates composed pContainers with a given size-specifications. Required for pC composition. More...
 
template<typename X , typename Y , typename DP >
 graph (boost::tuples::cons< X, Y > dims, const DP &dis_policy)
 Creates composed pContainers with a given size-specifications. Required for pC composition. More...
 
template<typename SizesView >
 graph (SizesView const &sizes_view, typename boost::enable_if< boost::mpl::and_< boost::is_same< size_type, typename SizesView::size_type >, boost::mpl::not_< is_distribution_view< SizesView > > > >::type *=0)
 Constructor for composed containers. For an m level composed container, sizes_view is an m-1 level composed view representing the sizes of the nested containers.
 
template<typename ComposedSpec >
 graph (ComposedSpec const &comp_spec, typename std::enable_if< detail::has_is_composed_dist_spec< ComposedSpec >::value >::type *=0)
 Constructor for composed containers. For an m level composed container, comp_spec contains specifications of the distributions of the current container and each of its elements. More...
 
template<typename DistSpecView >
 graph (std::vector< DistSpecView > const &dist_specs, typename std::enable_if< is_distribution_view< DistSpecView >::value &&!detail::has_is_composed_dist_spec< DistSpecView >::value >::type *=0)
 Constructor for composed containers. For an m level composed container, dist_specs contains specifications of the distributions to be used at each level of the composed container. More...
 
boost::shared_ptr< this_typeshared_from_this ()
 

Protected Types

using base_type = typename graph_directedness_container_selector< D, M, OptionalParams... >::type
 
using this_type = graph< D, M, OptionalParams... >
 

Detailed Description

template<graph_attributes D, graph_attributes M, typename ... OptionalParams>
class stapl::graph< D, M, OptionalParams >

Parallel static graph container. Inherits all functionality from either undirected_graph or directed_graph.

Static graphs do not allow addition or deletion of vertices. The number of vertices must be known at construction. Edges may be added/deleted. Uses directedness selector to inherit from correct directed/undirected base.

Template Parameters
Dgraph-attribute specifying Directedness (DIRECTED/UNDIRECTED).
Mgraph-attribute specifying Multiedge. (MULTIEDGES/NONMULTIEDGES).
VertexPxtype of property for the vertex. Default is no_property. Must be default assignable, copyable and assignable.
EdgePxtype of property for the edge. Default is no_property. Must be default assignable, copyable and assignable.
PSxPartition strategy that defines how to partition the original domain into subdomains. The default partition is balanced_partition.
MapxMapper that defines how to map the subdomains produced by the partition to locations. The default mapper is mapper.
TraitsxA traits class that defines customizable components of graph, such as the domain type, base container type, storage, etc. The default traits class is static_graph_traits.
Dgraph-attribute specifying Directedness (DIRECTED/UNDIRECTED).
Mgraph-attribute specifying Multiedge. (MULTIEDGES/NONMULTIEDGES).
VertexPtype of property for the vertex. Default is no_property. Must be default assignable, copyable and assignable.
EdgePtype of property for the edge. Default is no_property. Must be default assignable, copyable and assignable.
PSPartition strategy that defines how to partition the original domain into subdomains. The default partition is balanced_partition.
MapMapper that defines how to map the subdomains produced by the partition to locations. The default mapper is mapper.
TraitsA traits class that defines customizable components of graph, such as the domain type, base container type, storage, etc. The default traits class is static_graph_traits.

Constructor & Destructor Documentation

◆ graph() [1/7]

template<graph_attributes D, graph_attributes M, typename ... OptionalParams>
stapl::graph< D, M, OptionalParams >::graph ( size_t const &  n,
mapper_type const &  m,
vertex_property const &  default_value = vertex_property() 
)

Creates a graph with a given size and mapper, with default value for vertex property.

Parameters
nSize of the graph.
mMapper for the data distribution.

◆ graph() [2/7]

template<graph_attributes D, graph_attributes M, typename ... OptionalParams>
template<typename DP >
stapl::graph< D, M, OptionalParams >::graph ( size_t  n,
vertex_property const &  default_value,
DP const &  dis_policy 
)

Creates a graph with a given size and default value where the vertex_property may itself be a parallel container. Required for pC composition.

Parameters
nThe number of vertices
default_valueThe initial value of the vertices' properties.
dis_policyA distribution policy that specifies how to distribute the nested containers, in the context of containers of containers.

◆ graph() [3/7]

template<graph_attributes D, graph_attributes M, typename ... OptionalParams>
template<typename DP >
stapl::graph< D, M, OptionalParams >::graph ( size_t  n,
DP const &  dis_policy 
)

Creates composed pContainers with a given distribution policy. Required for pC composition.

Parameters
dis_policyA distribution policy that specifies how to distribute the nested containers, in the context of containers of containers.

◆ graph() [4/7]

template<graph_attributes D, graph_attributes M, typename ... OptionalParams>
template<typename X , typename Y >
stapl::graph< D, M, OptionalParams >::graph ( boost::tuples::cons< X, Y >  dims)

Creates composed pContainers with a given size-specifications. Required for pC composition.

Parameters
dimsdimensions of the internal containers.

◆ graph() [5/7]

template<graph_attributes D, graph_attributes M, typename ... OptionalParams>
template<typename X , typename Y , typename DP >
stapl::graph< D, M, OptionalParams >::graph ( boost::tuples::cons< X, Y >  dims,
const DP &  dis_policy 
)

Creates composed pContainers with a given size-specifications. Required for pC composition.

Parameters
dimsdimensions of the internal containers.
dis_policyA distribution policy that specifies how to distribute the nested containers, in the context of containers of containers.

◆ graph() [6/7]

template<graph_attributes D, graph_attributes M, typename ... OptionalParams>
template<typename ComposedSpec >
stapl::graph< D, M, OptionalParams >::graph ( ComposedSpec const &  comp_spec,
typename std::enable_if< detail::has_is_composed_dist_spec< ComposedSpec >::value >::type *  = 0 
)

Constructor for composed containers. For an m level composed container, comp_spec contains specifications of the distributions of the current container and each of its elements.

The specification of the current container's distribution is accessed by calling the spec() method, while the distribution specification of an element is accessed via operator[].

Parameters
comp_specInstance of composed_dist_spec representing the distribution specifications for each nested container.

◆ graph() [7/7]

template<graph_attributes D, graph_attributes M, typename ... OptionalParams>
template<typename DistSpecView >
stapl::graph< D, M, OptionalParams >::graph ( std::vector< DistSpecView > const &  dist_specs,
typename std::enable_if< is_distribution_view< DistSpecView >::value &&!detail::has_is_composed_dist_spec< DistSpecView >::value >::type *  = 0 
)

Constructor for composed containers. For an m level composed container, dist_specs contains specifications of the distributions to be used at each level of the composed container.

The first element of the vector specifies the distribution of the outer container, the second the distribution of the containers at the first level of composition, etc. The number of elements in dist_specs must be at least the same as the number of levels of container composition.

The result of the constructor is a container composition where the size and distribution of the container elements at a given level of the composition are the same.

Parameters
dist_specsdistribution specifications that are used to construct the nested containers at a given level of the composition.

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