]> granicus.if.org Git - graphviz/commitdiff
remove unused vector_percentile
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 23 Jun 2021 03:42:44 +0000 (20:42 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Fri, 25 Jun 2021 13:52:00 +0000 (06:52 -0700)
lib/sparse/general.c
lib/sparse/general.h

index 1ba6358a439cf71375fda74ef193c2db4545754f..4e5402570dd17b46ce737e57f9357983f9a59ef0 100644 (file)
 double _statistics[10];
 #endif
 
-real vector_percentile(int n, real *x, real y){
-  /* find the value such that y% of element of vector x is <= that value.
-   y: a value between 0 and 1.
-  */
-  int *p = NULL, i;
-  real res;
-  vector_ordering(n, x, &p);
-  
-
-  y = MIN(y, 1);
-  y = MAX(0, y);
-
-  i = n*y;
-  res = x[p[i]];
-  FREE(p); return res;
-}
-
 real drand(){
   return rand()/(real) RAND_MAX;
 }
index 40329d9fc04c5b68eb7bb062cca06c38ed9badfb..1112f9ee63dc6d7867781fc7238b0b0be9c6322e 100644 (file)
@@ -104,7 +104,6 @@ void vector_float_take(int n, float *v, int m, int *p, float **u);
 */
 void vector_ordering(int n, real *v, int **p);
 void vector_sort_int(int n, int *v);
-real vector_percentile(int n, real *x, real y);/* find the value such that y% of element of vector x is <= that value.*/
 
 void vector_print(char *s, int n, real *x);