 28 Apr, 2014 3 commits


Jason Rhinelander authored
The previous version was using a generic LU inverse, which ran into numerical stability problems for large q values. For example, q=7, c=0, b=(1.40, 1.41, ..., 1.50) looked like: 0.1767019 0.1741197 0.1640931 0.1330334 0.2003187 0.1792207 0.1792029 0.175216 0.1836156 0.2131243 0.2235138 because the source data files have only slight variation in that range. Using a cholesky decomposition inverse fixes this, and gives numbers agreeing exactly with JGM's fortran version (which also uses Cholesky decomposition): 0.1744341 0.1780252 0.181262 0.1841298 0.1866257 0.1887341 0.1904548 0.1917758 0.1926928 0.1932153 0.1933418 which agrees precisely with JGM's (trimmed) fracdist output of: P value = 0.174 P value = 0.178 P value = 0.181 P value = 0.184 P value = 0.187 P value = 0.189 P value = 0.190 P value = 0.192 P value = 0.193 P value = 0.193 P value = 0.193

Jason Rhinelander authored

Jason Rhinelander authored

 12 Mar, 2014 2 commits


Jason Rhinelander authored
It isn't doing anything useful anymore, since the libgsl dep is gone.

Jason Rhinelander authored

 10 Mar, 2014 1 commit


Jason Rhinelander authored
The 1.0.0 release binary packages were installing headers in the wrong place (include/common.hpp, etc. instead of include/fracdist/common.hpp), and were missing the fracdist/data.hpp header. Added component configurations for Windows installers so that Windows users can elect to not install the headers and/or docs when using the .exe installer.

 09 Mar, 2014 7 commits


Jason Rhinelander authored

Jason Rhinelander authored

Jason Rhinelander authored

Jason Rhinelander authored

Jason Rhinelander authored
This way the project doesn't actually contain it, which is better.

Jason Rhinelander authored

Jason Rhinelander authored
There's no reason for QCache to be in the header as its entirely private to common.cpp. Moved it (and unnamed it).

 08 Mar, 2014 10 commits


Jason Rhinelander authored
Eigen3 is getting something wrong with the matrix reuse (clang doesn't seem to have a problem). Forcing Eigen to build the result is worthwhile anyway (lazy evaluation here is probably not helpful).

Jason Rhinelander authored

Jason Rhinelander authored
1.1.0 seems silly, since there hasn't actually been a 1.0.0 release.

Jason Rhinelander authored

Jason Rhinelander authored

Jason Rhinelander authored
These will be used if the system libraries can't be found (which is almost always the case when doing a mingw build).

Jason Rhinelander authored
fracdist::ostringstream is a very light wrapper around std::ostringstream that overrides << to return its own class, and can be converted to a string with needing a .str() call.

Jason Rhinelander authored

Jason Rhinelander authored

Jason Rhinelander authored

 07 Mar, 2014 9 commits


Jason Rhinelander authored

Jason Rhinelander authored

Jason Rhinelander authored

Jason Rhinelander authored

Jason Rhinelander authored

Jason Rhinelander authored

Jason Rhinelander authored

Jason Rhinelander authored
Also shortcircuit the calculations for 0/infinity cases (i.e. pvalue for infinity is 0, pvalue for 0 is 1, and vice versa for critical values)

Jason Rhinelander authored
Converting argument parsing to use strtod/strtoul instead of sscanf, particularly because win32 sscanf doesn't like "inf", but win32 strtod is fine with it. Convert output to %.7g instead of %.6f as it's nicer for small values. Explicitly print "inf" for an infinite result (i.e. the critical value for a test level of 0) since %f doesn't seem to do that on win32.

 06 Mar, 2014 8 commits


Jason Rhinelander authored

Jason Rhinelander authored
 the critical value code and fdcrit executable are now implemented, and agree with fracdist.f results.  exposed the quantile calculation code (renaming it to fracdist_get_quantiles)  fracdist_get_quantiles now caches its result; the cache will be used when next call uses the same q, b, constant, and interp values, and reset when called with new values.  Fixed code that wasn't freeing the return quantiles array.  abstracted closestvaluefinding and bracketfinding code (since they are used for both pvalue and critical value code).  cache the results of the chisq inverse (this will mostly help if critical values are sought several times).  added new fracdist_error_unknown error code for reporting unknown errors (currently used if fracdist_get_quantiles somehow returns a null pointer without setting error_code_). This error shouldn't ever happen, but is useful as a safety check against potential bugs.

Jason Rhinelander authored
The code already needs C99, so might as well use C99's bool.

Jason Rhinelander authored
fracdistdata.c is only used to build the .so, which contains machine representation of all this data anyway: reducing the size of the .c is thus pointless. On top of that, it really saves very little (around 26KB in a 2.76MB file).

Jason Rhinelander authored
This required rearranging arguments so that the test statistic comes last (so that more than one can be given). Output is now one pvalue per line, in the same order as those given on the command line arguments. This also silences some unsigned/signed and long/int comparison warnings.

Jason Rhinelander authored

Jason Rhinelander authored

Jason Rhinelander authored
