projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
math: Avoid unneeded extra allocations for fixed-size data structures.
[pspp]
/
src
/
math
/
percentiles.h
diff --git
a/src/math/percentiles.h
b/src/math/percentiles.h
index 0dd09820945e1bafaee5a017ba3756cb4197783b..86fd641addd46d5e6c3c955e547421a04649cf65 100644
(file)
--- a/
src/math/percentiles.h
+++ b/
src/math/percentiles.h
@@
-1,5
+1,5
@@
/* PSPP - a program for statistical analysis.
/* PSPP - a program for statistical analysis.
- Copyright (C) 2004, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2008
, 2009
Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@
-31,9
+31,6
@@
enum pc_alg {
PC_AEMPIRICAL
} ;
PC_AEMPIRICAL
} ;
-extern const char *const ptile_alg_desc[];
-
-
struct percentile
{
struct order_stats parent;
struct percentile
{
struct order_stats parent;
@@
-47,12
+44,14
@@
struct percentile
double g2;
double g2_star;
double g2;
double g2_star;
+
+ struct k k[2];
};
/* Create the Pth percentile.
W is the total sum of weights in the data set
*/
};
/* Create the Pth percentile.
W is the total sum of weights in the data set
*/
-struct
order_stats
*percentile_create (double p, double W);
+struct
percentile
*percentile_create (double p, double W);
/* Return the value of the percentile */
double percentile_calculate (const struct percentile *ptl, enum pc_alg alg);
/* Return the value of the percentile */
double percentile_calculate (const struct percentile *ptl, enum pc_alg alg);