00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #include <mtgl/util.hpp>
00022 #include <mtgl/metrics.hpp>
00023
00024 using namespace mtgl;
00025
00026 #ifndef GET_FREQ
00027 #define GET_FREQ
00028
00029 double get_freq()
00030 {
00031 #ifdef __MTA__
00032 double freq = mta_clock_freq();
00033 #else
00034 double freq = 1000000;
00035 #endif
00036 return freq;
00037 }
00038 #endif
00039
00040 template <typename graph>
00041 void test_find_assortativity(graph& g, int types)
00042 {
00043 double result;
00044
00045 find_assortativity<graph> fa(g, &result, types);
00046
00047 int ticks1 = fa.run();
00048
00049
00050 fprintf(stdout, "assortativity = %lf\n", result);
00051 fprintf(stderr, "RESULT: find_assortativity %lu (%6.2lf, 0)\n",
00052 num_edges(g), ticks1 / get_freq());
00053 }