This file is indexed.

/usr/include/root/Math/QuantFuncMathCore.h is in libroot-math-mathcore-dev 5.34.30-0ubuntu8.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
// @(#)root/mathcore:$Id$
// Authors: L. Moneta, A. Zsenei   08/2005 


// Authors: Andras Zsenei & Lorenzo Moneta   08/2005 


/**********************************************************************
 *                                                                    *
 * Copyright (c) 2005 , LCG ROOT MathLib Team                         *
 *                                                                    *
 *                                                                    *
 **********************************************************************/


#if defined(__CINT__) && !defined(__MAKECINT__)
// avoid to include header file when using CINT 
#ifndef _WIN32
#include "../lib/libMathCore.so"
#else
#include "../bin/libMathCore.dll"
#endif

#else


#ifndef ROOT_Math_QuantFuncMathCore
#define ROOT_Math_QuantFuncMathCore


namespace ROOT {
namespace Math {



  /** @defgroup QuantFunc Quantile Functions 
   *  @ingroup StatFunc 
   *
   *  Inverse functions of the cumulative distribution functions 
   *  and the inverse of the complement of the cumulative distribution functions 
   *  for various distributions.
   *  The functions with the extension <em>_quantile</em> calculate the
   *  inverse of the <em>_cdf</em> function, the 
   *  lower tail integral of the probability density function
   *  \f$D^{-1}(z)\f$ where
   *
   *  \f[ D(x) = \int_{-\infty}^{x} p(x') dx' \f]
   *
   *  while those with the <em>_quantile_c</em> extension calculate the 
   *  inverse of the <em>_cdf_c</em> functions, the upper tail integral of the probability 
   *  density function \f$D^{-1}(z) \f$ where
   *
   *  \f[ D(x) = \int_{x}^{+\infty} p(x') dx' \f]
   *
   *  These functions are defined in the header file <em>Math/ProbFunc.h<em> or in the global one 
   *  including all statistical dunctions <em>Math/DistFunc.h<em>
   *
   *
   * <strong>NOTE:</strong> In the old releases (< 5.14) the <em>_quantile</em> functions were called 
   * <em>_quant_inv</em> and the <em>_quantile_c</em> functions were called 
   * <em>_prob_inv</em>. 
   * These names are currently kept for backward compatibility, but 
   * their usage is deprecated.
   *
   */

   /** @name Quantile Functions from MathCore 
   * The implementation is provided in MathCore and for the majority of the function comes from 
   * <A HREF="http://www.netlib.org/cephes">Cephes</A>. 

   */ 

  //@{



  /**
     
     Inverse (\f$D^{-1}(z)\f$) of the cumulative distribution 
     function of the upper tail of the beta distribution
     (#beta_cdf_c). 
     It is implemented using the function incbi from <A HREF="http://www.netlib.org/cephes">Cephes</A>. 
  
  
     @ingroup QuantFunc

  */
   double beta_quantile(double x, double a, double b);

   /**

      Inverse (\f$D^{-1}(z)\f$) of the cumulative distribution 
      function of the lower tail of the beta distribution
      (#beta_cdf). 
      It is implemented using 
      the function incbi from <A HREF="http://www.netlib.org/cephes">Cephes</A>. 

      @ingroup QuantFunc

   */
   double beta_quantile_c(double x, double a, double b);



   /**

      Inverse (\f$D^{-1}(z)\f$) of the cumulative distribution 
      function of the upper tail of the Cauchy distribution (#cauchy_cdf_c) 
      which is also called Lorentzian distribution. For 
      detailed description see 
      <A HREF="http://mathworld.wolfram.com/CauchyDistribution.html">
      Mathworld</A>. 
  
      @ingroup QuantFunc

   */

   double cauchy_quantile_c(double z, double b);




   /**

      Inverse (\f$D^{-1}(z)\f$) of the cumulative distribution 
      function of the lower tail of the Cauchy distribution (#cauchy_cdf) 
      which is also called Breit-Wigner or Lorentzian distribution. For 
      detailed description see 
      <A HREF="http://mathworld.wolfram.com/CauchyDistribution.html">
      Mathworld</A>. The implementation used is that of 
      <A HREF="http://www.gnu.org/software/gsl/manual/gsl-ref_19.html#SEC294">GSL</A>.
  
      @ingroup QuantFunc

   */

   double cauchy_quantile(double z, double b);




   /**

      Inverse (\f$D^{-1}(z)\f$) of the cumulative distribution 
      function of the upper tail of the Breit-Wigner distribution (#breitwigner_cdf_c) 
      which is similar to the Cauchy distribution. For 
      detailed description see 
      <A HREF="http://mathworld.wolfram.com/CauchyDistribution.html">
      Mathworld</A>. It is evaluated using the same implementation of 
      #cauchy_quantile_c. 
  
      @ingroup QuantFunc

   */

   inline double breitwigner_quantile_c(double z, double gamma) { 
      return cauchy_quantile_c(z, gamma/2.0);
   }




   /**

      Inverse (\f$D^{-1}(z)\f$) of the cumulative distribution 
      function of the lower tail of the Breit_Wigner distribution (#breitwigner_cdf) 
      which is similar to the Cauchy distribution. For  
      detailed description see 
      <A HREF="http://mathworld.wolfram.com/CauchyDistribution.html">
      Mathworld</A>. It is evaluated using the same implementation of 
      #cauchy_quantile. 

  
      @ingroup QuantFunc

   */

   inline double breitwigner_quantile(double z, double gamma) { 
      return cauchy_quantile(z, gamma/2.0);
   }






   /**

      Inverse (\f$D^{-1}(z)\f$) of the cumulative distribution 
      function of the upper tail of the \f$\chi^2\f$ distribution 
      with \f$r\f$ degrees of freedom (#chisquared_cdf_c). For detailed description see 
      <A HREF="http://mathworld.wolfram.com/Chi-SquaredDistribution.html">
      Mathworld</A>. It is implemented using the inverse of the incomplete complement gamma function, using 
      the function igami from <A HREF="http://www.netlib.org/cephes">Cephes</A>. 
  
      @ingroup QuantFunc

   */

   double chisquared_quantile_c(double z, double r);



   /**

      Inverse (\f$D^{-1}(z)\f$) of the cumulative distribution 
      function of the lower tail of the \f$\chi^2\f$ distribution 
      with \f$r\f$ degrees of freedom (#chisquared_cdf). For detailed description see 
      <A HREF="http://mathworld.wolfram.com/Chi-SquaredDistribution.html">
      Mathworld</A>. 
      It is implemented using  chisquared_quantile_c, therefore is not very precise for small z. 
      It is reccomended to use the MathMore function (ROOT::MathMore::chisquared_quantile )implemented using GSL

      @ingroup QuantFunc

   */

   double chisquared_quantile(double z, double r);  



   /**

      Inverse (\f$D^{-1}(z)\f$) of the cumulative distribution 
      function of the upper tail of the exponential distribution
      (#exponential_cdf_c). For detailed description see 
      <A HREF="http://mathworld.wolfram.com/ExponentialDistribution.html">
      Mathworld</A>.
  
      @ingroup QuantFunc

   */

   double exponential_quantile_c(double z, double lambda);




   /**

      Inverse (\f$D^{-1}(z)\f$) of the cumulative distribution 
      function of the lower tail of the exponential distribution
      (#exponential_cdf). For detailed description see 
      <A HREF="http://mathworld.wolfram.com/ExponentialDistribution.html">
      Mathworld</A>. 
  
      @ingroup QuantFunc

   */

   double exponential_quantile(double z, double lambda);

  

   /**

      Inverse (\f$D^{-1}(z)\f$) of the cumulative distribution 
      function of the lower tail of the f distribution
      (#fdistribution_cdf). For detailed description see 
      <A HREF="http://mathworld.wolfram.com/F-Distribution.html">
      Mathworld</A>.
      It is implemented using the inverse of the incomplete beta function, 
      function incbi from <A HREF="http://www.netlib.org/cephes">Cephes</A>. 
  
      @ingroup QuantFunc

   */
   double fdistribution_quantile(double z, double n, double m);  

   /**

      Inverse (\f$D^{-1}(z)\f$) of the cumulative distribution 
      function of the upper tail of the f distribution
      (#fdistribution_cdf_c). For detailed description see 
      <A HREF="http://mathworld.wolfram.com/F-Distribution.html">
      Mathworld</A>.
      It is implemented using the inverse of the incomplete beta function, 
      function incbi from <A HREF="http://www.netlib.org/cephes">Cephes</A>. 
  
      @ingroup QuantFunc
   */

   double fdistribution_quantile_c(double z, double n, double m);  


   /**

      Inverse (\f$D^{-1}(z)\f$) of the cumulative distribution 
      function of the upper tail of the gamma distribution
      (#gamma_cdf_c). For detailed description see 
      <A HREF="http://mathworld.wolfram.com/GammaDistribution.html">
      Mathworld</A>. The implementation used is that of 
      <A HREF="http://www.gnu.org/software/gsl/manual/gsl-ref_19.html#SEC300">GSL</A>.
      It is implemented using the function igami taken 
      from <A HREF="http://www.netlib.org/cephes">Cephes</A>. 
  
      @ingroup QuantFunc

   */

   double gamma_quantile_c(double z, double alpha, double theta);




   /**

      Inverse (\f$D^{-1}(z)\f$) of the cumulative distribution 
      function of the lower tail of the gamma distribution
      (#gamma_cdf). For detailed description see 
      <A HREF="http://mathworld.wolfram.com/GammaDistribution.html">
      Mathworld</A>.
      It is implemented using  chisquared_quantile_c, therefore is not very precise for small z. 
      For this special cases it is reccomended to use the MathMore function ROOT::MathMore::gamma_quantile
      implemented using GSL

  
      @ingroup QuantFunc

   */

   double gamma_quantile(double z, double alpha, double theta);



   /**

      Inverse (\f$D^{-1}(z)\f$) of the cumulative distribution 
      function of the upper tail of the normal (Gaussian) distribution
      (#gaussian_cdf_c). For detailed description see 
      <A HREF="http://mathworld.wolfram.com/NormalDistribution.html">
      Mathworld</A>. It can also be evaluated using #normal_quantile_c which will 
      call the same implementation. 

      @ingroup QuantFunc

   */

   double gaussian_quantile_c(double z, double sigma);




   /**

      Inverse (\f$D^{-1}(z)\f$) of the cumulative distribution 
      function of the lower tail of the normal (Gaussian) distribution
      (#gaussian_cdf). For detailed description see 
      <A HREF="http://mathworld.wolfram.com/NormalDistribution.html">
      Mathworld</A>. It can also be evaluated using #normal_quantile which will 
      call the same implementation.
      It is implemented using the function  ROOT::Math::Cephes::ndtri taken from 
      <A HREF="http://www.netlib.org/cephes">Cephes</A>. 

      @ingroup QuantFunc

   */

   double gaussian_quantile(double z, double sigma);




   /**

      Inverse (\f$D^{-1}(z)\f$) of the cumulative distribution 
      function of the upper tail of the lognormal distribution
      (#lognormal_cdf_c). For detailed description see 
      <A HREF="http://mathworld.wolfram.com/LogNormalDistribution.html">
      Mathworld</A>. The implementation used is that of 
      <A HREF="http://www.gnu.org/software/gsl/manual/gsl-ref_19.html#SEC302">GSL</A>.
  
      @ingroup QuantFunc

   */

   double lognormal_quantile_c(double x, double m, double s);




   /**

      Inverse (\f$D^{-1}(z)\f$) of the cumulative distribution 
      function of the lower tail of the lognormal distribution
      (#lognormal_cdf). For detailed description see 
      <A HREF="http://mathworld.wolfram.com/LogNormalDistribution.html">
      Mathworld</A>. The implementation used is that of 
      <A HREF="http://www.gnu.org/software/gsl/manual/gsl-ref_19.html#SEC302">GSL</A>.
  
      @ingroup QuantFunc

   */

   double lognormal_quantile(double x, double m, double s);




   /**

      Inverse (\f$D^{-1}(z)\f$) of the cumulative distribution 
      function of the upper tail of the normal (Gaussian) distribution
      (#normal_cdf_c). For detailed description see 
      <A HREF="http://mathworld.wolfram.com/NormalDistribution.html">
      Mathworld</A>. It can also be evaluated using #gaussian_quantile_c which will 
      call the same implementation. 
      It is implemented using the function  ROOT::Math::Cephes::ndtri taken from 
      <A HREF="http://www.netlib.org/cephes">Cephes</A>. 

      @ingroup QuantFunc

   */

   double normal_quantile_c(double z, double sigma);
   /// alternative name for same function
   inline double gaussian_quantile_c(double z, double sigma) { 
      return normal_quantile_c(z,sigma);
   }




   /**

      Inverse (\f$D^{-1}(z)\f$) of the cumulative distribution 
      function of the lower tail of the normal (Gaussian) distribution
      (#normal_cdf). For detailed description see 
      <A HREF="http://mathworld.wolfram.com/NormalDistribution.html">
      Mathworld</A>. It can also be evaluated using #gaussian_quantile which will 
      call the same implementation.
      It is implemented using the function  ROOT::Math::Cephes::ndtri taken from 
      <A HREF="http://www.netlib.org/cephes">Cephes</A>. 


      @ingroup QuantFunc

   */

   double normal_quantile(double z, double sigma);
   /// alternative name for same function
   inline double gaussian_quantile(double z, double sigma) { 
      return normal_quantile(z,sigma);
   }



#ifdef LATER // t quantiles are still in MathMore

   /**

      Inverse (\f$D^{-1}(z)\f$) of the cumulative distribution 
      function of the upper tail of Student's t-distribution
      (#tdistribution_cdf_c). For detailed description see 
      <A HREF="http://mathworld.wolfram.com/Studentst-Distribution.html">
      Mathworld</A>. The implementation used is that of 
      <A HREF="http://www.gnu.org/software/gsl/manual/gsl-ref_19.html#SEC305">GSL</A>.
  
      @ingroup QuantFunc

   */

   double tdistribution_quantile_c(double z, double r);




   /**

      Inverse (\f$D^{-1}(z)\f$) of the cumulative distribution 
      function of the lower tail of Student's t-distribution
      (#tdistribution_cdf). For detailed description see 
      <A HREF="http://mathworld.wolfram.com/Studentst-Distribution.html">
      Mathworld</A>. The implementation used is that of 
      <A HREF="http://www.gnu.org/software/gsl/manual/gsl-ref_19.html#SEC305">GSL</A>.
  
      @ingroup QuantFunc

   */

   double tdistribution_quantile(double z, double r);

#endif


   /**

      Inverse (\f$D^{-1}(z)\f$) of the cumulative distribution 
      function of the upper tail of the uniform (flat) distribution
      (#uniform_cdf_c). For detailed description see 
      <A HREF="http://mathworld.wolfram.com/UniformDistribution.html">
      Mathworld</A>.
  
      @ingroup QuantFunc

   */

   double uniform_quantile_c(double z, double a, double b);




   /**

      Inverse (\f$D^{-1}(z)\f$) of the cumulative distribution 
      function of the lower tail of the uniform (flat) distribution
      (#uniform_cdf). For detailed description see 
      <A HREF="http://mathworld.wolfram.com/UniformDistribution.html">
      Mathworld</A>.
  
      @ingroup QuantFunc

   */

   double uniform_quantile(double z, double a, double b);




   /**

      Inverse (\f$D^{-1}(z)\f$) of the cumulative distribution 
      function of the lower tail of the Landau distribution
      (#landau_cdf).

   For detailed description see 
   K.S. K&ouml;lbig and B. Schorr, A program package for the Landau distribution, 
   <A HREF="http://dx.doi.org/10.1016/0010-4655(84)90085-7">Computer Phys. Comm. 31 (1984) 97-111</A>
   <A HREF="http://dx.doi.org/10.1016/j.cpc.2008.03.002">[Erratum-ibid. 178 (2008) 972]</A>. 
   The same algorithms as in 
   <A HREF="http://wwwasdoc.web.cern.ch/wwwasdoc/shortwrupsdir/g110/top.html">
   CERNLIB</A> (RANLAN) is used.  
   
   @param z The argument \f$z\f$ 
   @param xi The width parameter \f$\xi\f$ 
  
      @ingroup QuantFunc

   */

   double landau_quantile(double z, double xi = 1);


   /**

      Inverse (\f$D^{-1}(z)\f$) of the cumulative distribution 
      function of the upper tail of the landau distribution
      (#landau_cdf_c).
      Implemented using #landau_quantile
   
   @param z The argument \f$z\f$ 
   @param xi The width parameter \f$\xi\f$ 
  
      @ingroup QuantFunc

   */

   double landau_quantile_c(double z, double xi = 1);


#ifdef HAVE_OLD_STAT_FUNC

   //@}
   /** @name Backward compatible functions */ 


   inline double breitwigner_prob_inv(double x, double gamma) {
      return  breitwigner_quantile_c(x,gamma);
   }
   inline double breitwigner_quant_inv(double x, double gamma) { 
      return  breitwigner_quantile(x,gamma);
   }

   inline double cauchy_prob_inv(double x, double b) { 
      return cauchy_quantile_c(x,b);
   }
   inline double cauchy_quant_inv(double x, double b) {
      return cauchy_quantile  (x,b);
   }

   inline double exponential_prob_inv(double x, double lambda) { 
      return exponential_quantile_c(x, lambda );
   }
   inline double exponential_quant_inv(double x, double lambda) {
      return exponential_quantile  (x, lambda );
   }

   inline double gaussian_prob_inv(double x, double sigma) {
      return  gaussian_quantile_c( x, sigma );
   }
   inline double gaussian_quant_inv(double x, double sigma) { 
      return  gaussian_quantile  ( x, sigma );
   }

   inline double lognormal_prob_inv(double x, double m, double s) {
      return lognormal_quantile_c( x, m, s );   
   }
   inline double lognormal_quant_inv(double x, double m, double s) {
      return lognormal_quantile  ( x, m, s );   
   }

   inline double normal_prob_inv(double x, double sigma) {
      return  normal_quantile_c( x, sigma );
   }
   inline double normal_quant_inv(double x, double sigma) {
      return  normal_quantile  ( x, sigma );
   }

   inline double uniform_prob_inv(double x, double a, double b) { 
      return uniform_quantile_c( x, a, b ); 
   }
   inline double uniform_quant_inv(double x, double a, double b) {
      return uniform_quantile  ( x, a, b ); 
   }

   inline double chisquared_prob_inv(double x, double r) {
      return chisquared_quantile_c(x, r ); 
   }
   
   inline double gamma_prob_inv(double x, double alpha, double theta) {
      return gamma_quantile_c (x, alpha, theta ); 
   }


#endif


} // namespace Math
} // namespace ROOT



#endif // ROOT_Math_QuantFuncMathCore

#endif // if defined (__CINT__) && !defined(__MAKECINT__)