Карта сайта Kansoftware
НОВОСТИУСЛУГИРЕШЕНИЯКОНТАКТЫ
Разработка программного обеспечения

Parallel BGL Scalable R-MAT generator

Boost , ,

Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

Parallel BGL Scalable R-MAT generator

 template<typename ProcessGroup, typename Distribution,
          typename RandomGenerator, typename Graph>
 class scalable_rmat_iterator
 {
 public:
   typedef std::input_iterator_tag iterator_category;
   typedef std::pair<vertices_size_type, vertices_size_type> value_type;
   typedef const value_type& reference;
   typedef const value_type* pointer;
   typedef void difference_type;
   scalable_rmat_iterator();
   scalable_rmat_iterator(ProcessGroup pg, Distribution distrib,
                          RandomGenerator& gen, vertices_size_type n,
                          edges_size_type m, double a, double b, double c,
                          double d, bool permute_vertices = true);
   // Iterator operations
   reference operator*() const;
   pointer operator->() const;
   scalable_rmat_iterator& operator++();
   scalable_rmat_iterator operator++(int);
   bool operator==(const scalable_rmat_iterator& other) const;
   bool operator!=(const scalable_rmat_iterator& other) const;
};

Этот шаблон класса реализует генератор для графов R-MAT[CZF04]., подходит для инициализации списка смежности или другой графовой структуры с инициализацией на основе итератора. График R-MAT имеет степень безмасштабного распределения w.r.t. и реализуется с использованием разбиения Recursive-MATrix.

Where Defined

boost/graph/rmat_graph_generator.hpp>

Constructors

scalable_rmat_iterator();

Создает итератор прошлого-конца.

scalable_rmat_iterator(ProcessGroup pg, Distribution distrib,
                       RandomGenerator& gen, vertices_size_type n,
                       edges_size_type m, double a, double b, double c,
                       double d, bool permute_vertices = true);

Конструирует итератор генератора R-MAT, который создает граф сnвершинами имкраями. Внутриscalable_rmat_iteratorпроцессы обмениваются данными, используяpgдля генерации своих локальных краев, как определенодистрибутивом.a,b,cиdпредставляют вероятность того, что сгенерированный край расположен на каждом из 4 квадрантов разделённой матрицы смежности. Вероятности взяты из генератора случайных чиселгена. Индексы Vertex изменяются для устранения локальности, когдаpermute_verticesЭто правда.

Example

#include <boost/graph/distributed/mpi_process_group.hpp>
#include <boost/graph/compressed_sparse_row_graph.hpp>
#include <boost/graph/rmat_graph_generator.hpp>
#include <boost/random/linear_congruential.hpp>
using boost::graph::distributed::mpi_process_group;
typedef compressed_sparse_row_graph<directedS, no_property, no_property, no_property,
                                    distributedS<mpi_process_group> > Graph;
typedef boost::scalable_rmat_iterator<boost::minstd_rand, Graph> RMATGen;
int main()
{
  boost::minstd_rand gen;
  mpi_process_group pg;
  int N = 100;
  boost::parallel::variant_distribution<ProcessGroup> distrib
    = boost::parallel::block(pg, N);
  // Create graph with 100 nodes and 400 edges
  Graph g(RMATGen(pg, distrib, gen, N, 400, 0.57, 0.19, 0.19, 0.05),
          RMATGen(), N, pg, distrib);
  return 0;
}

Bibliography

[CZF04]D Chakrabarti, Y Zhan и C Faloutsos. R-MAT: Рекурсивная модель для графического майнинга. Proceedings of 4th International Conference on Data Mining, pages 442--446, 2004.

Copyright (C) 2009 Попечители Университета Индианы.

Авторы: Ник Эдмондс, Брайан Барретт и Эндрю Ламсдейн

Статья Parallel BGL Scalable R-MAT generator раздела может быть полезна для разработчиков на c++ и boost.




Материалы статей собраны из открытых источников, владелец сайта не претендует на авторство. Там где авторство установить не удалось, материал подаётся без имени автора. В случае если Вы считаете, что Ваши права нарушены, пожалуйста, свяжитесь с владельцем сайта.



:: Главная :: ::


реклама


©KANSoftWare (разработка программного обеспечения, создание программ, создание интерактивных сайтов), 2007
Top.Mail.Ru

Время компиляции файла: 2024-08-30 11:47:00
2025-07-05 11:28:11/0.0062930583953857/0