demo/descriptor_map_demo.cc
changeset 1556 caf0f91e16a7
parent 1554 572bc7d0d3e2
child 1636 260ac104190f
equal deleted inserted replaced
1:8b22d2089cb9 2:cee2c31b7d71
    88   // number of the nodes of the graph. The inverse map gives back the
    88   // number of the nodes of the graph. The inverse map gives back the
    89   // the node by its descriptor value. 
    89   // the node by its descriptor value. 
    90   //
    90   //
    91   // The inversemap cannot works without its DescriptorMap because
    91   // The inversemap cannot works without its DescriptorMap because
    92   // it holds reference to it. 
    92   // it holds reference to it. 
    93   const int EDGE = (int)(NODE * std::log(NODE));
    93   const int EDGE = (int)(NODE * std::log(double(NODE)));
    94   for (int i = 0; i < EDGE; ++i) {
    94   for (int i = 0; i < EDGE; ++i) {
    95     int si = (int)(std::rand() / (RAND_MAX + 1.0) * NODE);
    95     int si = (int)(std::rand() / (RAND_MAX + 1.0) * NODE);
    96     int ti = (int)(std::rand() / (RAND_MAX + 1.0) * NODE);
    96     int ti = (int)(std::rand() / (RAND_MAX + 1.0) * NODE);
    97       
    97       
    98     graph.addEdge(nodeInv[si], nodeInv[ti]);
    98     graph.addEdge(nodeInv[si], nodeInv[ti]);