Hi..
I m performing scalability test over
BGL . Means i m checking out how big a graph can be
constructed using BGL.
For the moment i m considering complete
graph.
I m able to construct a complete
graph with 3000 vertices but beyond that it crashes.
Anybody who has done scalability test
over BGL Kindly help. As this can be treated as a benchmark
for BGL and then we can improve on this
in near future...
Following is my code..
#include <cstdlib>
#include <iostream>
#include<vector>
#include <iostream>
#include <fstream>
#include <string>
#include <boost\config.hpp>
#include <boost\graph\adjacency_list.hpp>
#include<boost\property_map.hpp>
#include<vector>
#include<string>
#include<algorithm>
using namespace std;
using namespace boost;
typedef unsigned long long ullong;
typedef adjacency_list < vecS, vecS,
undirectedS, property < vertex_name_t,
std::string >, property < edge_name_t,
std::string ,property < edge_weight_t, int > > > Graph;
Graph g;
typedef graph_traits < Graph >::vertex_descriptor
Vertex;
std::vector<vector<int> >
adj_matrix;
fstream file_op("C:\\Scalability\\output\\debug.out",ios::out);
int main(int argc, char *argv[])
{
int SIZE;
cout<<"\n Enter
the matrix size";
cin>>SIZE;
cout<<"\n The
matrix is "<<SIZE<<"x"<<SIZE;
Vertex u;
for(int i=0;i<SIZE;i++)
{
u=add_vertex(g);
}
for(ullong
i=0;i<SIZE;i++)
{
for(ullong j=0;j<SIZE;j++)
{
if(i!=j)
{
add_edge(i,j,g);
}
}
}
file_op<<"\n
Number of vertices in the graph "<<num_vertices(g);
long double nume=num_edges(g);
file_op<<"\n
Number of edges in the graph "<<nume;
system("PAUSE");
return EXIT_SUCCESS;
}
Thanks
Abhishek Vyas
Tata Consultancy Services
Mailto: abhishek.v@tcs.com
Website: http://www.tcs.com
____________________________________________
Experience certainty. IT Services
Business Solutions
Outsourcing
____________________________________________=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain
confidential or privileged information. If you are
not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the
information contained in this e-mail message
and/or attachments to it are strictly prohibited. If
you have received this communication in error,
please notify us by reply e-mail or telephone and
immediately and permanently delete the message
and any attachments. Thank you