Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.21 KB | None | 0 0
  1.   double dx=0.001;
  2.   for(double x=-1; x<+1; x+=dx) {
  3.     double ll=0;
  4.  
  5.     for(int i=0; i<G.size(); i++) {
  6.       if ((dx - abs(G[i] - x))>0)
  7.     ll++;
  8.     }
  9.     cout << x << " " << ll/(double)G.size() << endl;
  10.   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement