Skip to content

Commit 3dbc5f7

Browse files
authored
[tutorials] Re-organize math tutorials (#17029)
* [tutorial] Add `Get started` list * [tutorial] Re-organize math tutorials
1 parent ae4b0b7 commit 3dbc5f7

109 files changed

Lines changed: 127 additions & 98 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

math/mathcore/inc/Math/PdfFuncMathCore.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -386,9 +386,9 @@ namespace Math {
386386

387387
/**
388388
389-
Probability density function of the normal (Gaussian) distribution.
389+
Probability density function of the normal (Gaussian) distribution with mean x0 and standard deviation sigma.
390390
391-
\f[ p(x) = {1 \over \sqrt{2 \pi \sigma^2}} e^{-x^2 / 2\sigma^2} \f]
391+
\f[ p(x) = {1 \over \sqrt{2 \pi \sigma^2}} e^{-(x-x_0)^2 / 2\sigma^2} \f]
392392
393393
For detailed description see
394394
<A HREF="http://mathworld.wolfram.com/NormalDistribution.html">
@@ -493,9 +493,9 @@ namespace Math {
493493

494494
/**
495495
496-
Probability density function of the normal (Gaussian) distribution.
496+
Probability density function of the normal (Gaussian) distribution with mean x0 and standard deviation sigma.
497497
498-
\f[ p(x) = {1 \over \sqrt{2 \pi \sigma^2}} e^{-x^2 / 2\sigma^2} \f]
498+
\f[ p(x) = {1 \over \sqrt{2 \pi \sigma^2}} e^{-(x-x_0)^2 / 2\sigma^2} \f]
499499
500500
For detailed description see
501501
<A HREF="http://mathworld.wolfram.com/NormalDistribution.html">
@@ -552,7 +552,7 @@ namespace Math {
552552
553553
\f[ p_{r}(x) = \frac{\Gamma(\frac{r+1}{2})}{\sqrt{r \pi}\Gamma(\frac{r}{2})} \left( 1+\frac{x^2}{r}\right)^{-(r+1)/2} \f]
554554
555-
for \f$k \geq 0\f$. For detailed description see
555+
for \f$r \geq 0\f$. For detailed description see
556556
<A HREF="http://mathworld.wolfram.com/Studentst-Distribution.html">
557557
Mathworld</A>.
558558

math/mathcore/src/TMath.cxx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2593,11 +2593,10 @@ Bool_t TMath::Permute(Int_t n, Int_t *a)
25932593

25942594
////////////////////////////////////////////////////////////////////////////////
25952595
/// Computes density function for Student's t- distribution
2596-
/// (the probability function (integral of density) is computed in StudentI).
2597-
///
2598-
/// First parameter stands for x - the actual variable of the
2599-
/// density function p(x) and the point at which the density is calculated.
2600-
/// Second parameter stands for number of degrees of freedom.
2596+
/// \f[ p_{n}(x) = \frac{\Gamma(\frac{n+1}{2})}{\sqrt{n \pi}\Gamma(\frac{n}{2})} \left( 1+\frac{x^2}{n}\right)^{-(n+1)/2} \f]
2597+
/// for \f$n \geq 0\f$, at point x for n (ndf) degrees of freedom.
2598+
/// This is equivalent to ROOT::Math::tdistribution_pdf(x,ndf)
2599+
/// The probability function (integral of density) is computed in StudentI.
26012600
///
26022601
/// About Student distribution:
26032602
/// Student's t-distribution is used for many significance tests, for example,

tutorials/CMakeLists.txt

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,11 @@ set(need_network dataframe/df027_SQliteDependencyOverVersion.C)
6767
#---Tutorials disabled depending on the build components-------------
6868

6969
if(NOT clad)
70-
set(clad_veto fit/minuit2GausFit.C
70+
set(clad_veto math/fit/minuit2GausFit.C
7171
# TODO: the next veto should not be necessary!
7272
# The tutorial should also work without clad.
7373
# See https://github.com/root-project/root/issues/15091.
74-
fit/exampleFit3D.C
74+
math/fit/exampleFit3D.C
7575
)
7676
endif()
7777

@@ -156,7 +156,7 @@ else()
156156
endif()
157157

158158
if(NOT ROOT_unuran_FOUND)
159-
set(unuran_veto math/testrandom.C unuran/unuranDemo.C unuran/unuranFoamTest.C
159+
set(unuran_veto math/testrandom.C math/unuran/unuranDemo.C math/unuran/unuranFoamTest.C
160160
math/multidimSampling.C)
161161
endif()
162162

@@ -197,7 +197,7 @@ endif()
197197

198198
# variables identifying the package must have the package name in lower case (it corresponds to the CMake option name)
199199
if(NOT ROOT_r_FOUND)
200-
set(r_veto r/*.C)
200+
set(r_veto math/r/*.C)
201201
endif()
202202

203203
set(histfactory_veto histfactory/makeExample.C)
@@ -210,18 +210,18 @@ if(NOT ROOT_mathmore_FOUND)
210210
set(mathmore_veto
211211
math/quasirandom.C
212212
math/exampleMultiRoot.C
213-
math/Bessel.C
213+
math/pdf/pdf009_Bessel.C
214214
math/LegendreAssoc.C
215215
math/Legendre.C
216216
math/mathmoreIntegration.C
217-
math/multivarGaus.C
218-
math/tStudent.C
219-
math/normalDist.C
217+
math/pdf/pdf007_multivarGaus.C
218+
math/pdf/pdf012_tStudent.C
219+
math/pdf/pdf001_Nornal.C
220220
roostats/TestNonCentral.C
221221
roostats/TestNonCentral.py
222222
math/Legendre.py
223-
math/Bessel.py
224-
math/tStudent.py)
223+
math/pdf/pdf009_Bessel.py
224+
math/pdf/pdf012_tStudent.py)
225225
endif()
226226

227227
if(NOT ROOT_fftw3_FOUND)
@@ -233,9 +233,9 @@ if(NOT ROOT_fftw3_FOUND)
233233
roofit/rf210_angularconv.py
234234
roofit/rf211_paramconv.py
235235
roofit/rf512_wsfactory_oper.py
236-
fft/FFT.C
237-
fit/fitConvolution.C
238-
fit/fitConvolution.py)
236+
math/fft/FFT.C
237+
math/fit/fitConvolution.C
238+
math/fit/fitConvolution.py)
239239
endif()
240240

241241
if(NOT ROOT_opengl_FOUND)
@@ -268,7 +268,7 @@ if(NOT gdml)
268268
endif()
269269

270270
#---These ones requires a display to run-----------------------------
271-
set(gui_veto fit/fitpanel_playback.C
271+
set(gui_veto math/fit/fitpanel_playback.C
272272
cocoa/*.C
273273
geom/building.C geom/cheongwadae.C geom/geom*.C geom/lego.C geom/robot.C geom/south_gate.C geom/station*.C geom/tank.C geom/webdemo.C geom/web_cms.cxx
274274
gl/glViewerExercise.C gl/glViewerLOD.C gl/gviz3d.C gl/nucleus.C gl/viewer3DLocal.C gl/viewer3DMaster.C
@@ -417,7 +417,7 @@ set(extra_veto
417417
tree/h1chain.C
418418
http/*.C
419419
eve7/*.C
420-
r/rootlogon.C)
420+
math/r/rootlogon.C)
421421

422422
if(MSVC AND NOT llvm13_broken_tests)
423423
list(APPEND extra_veto
@@ -500,7 +500,7 @@ if(mpi)
500500
endif()
501501

502502
#---Special return code------------------------------------------------
503-
set(returncode_1 fit/fit2a.C
503+
set(returncode_1 math/fit/fit2a.C
504504
graphics/earth.C
505505
graphics/pavetext.C
506506
graphics/tmathtext.C graphics/tmathtext2.C
@@ -515,7 +515,7 @@ set(returncode_1 fit/fit2a.C
515515
hist/hlabels2.C
516516
tree/h1analysis.C
517517
math/chi2test.C
518-
r/SimpleFitting.C)
518+
math/r/SimpleFitting.C)
519519
#---Dependencies------------------------------------------------------
520520
set(unfold-testUnfold5d-depends tutorial-unfold-testUnfold5c)
521521
set(unfold-testUnfold5c-depends tutorial-unfold-testUnfold5b)
@@ -527,15 +527,15 @@ set(xml-xmlmodifyfile-depends tutorial-xml-xmlnewfile)
527527
set(xml-xmlreadfile-depends tutorial-xml-xmlnewfile)
528528
set(roofit-rf503_wspaceread-depends tutorial-roofit-rf502_wspacewrite)
529529
set(io-readCode-depends tutorial-io-importCode)
530-
set(fit-fit1-depends tutorial-hist-fillrandom)
531-
set(fit-myfit-depends tutorial-fit-fitslicesy)
532-
set(foam-foam_demopers-depends tutorial-foam-foam_demo)
530+
set(math-fit-fit1-depends tutorial-hist-fillrandom)
531+
set(math-fit-myfit-depends tutorial-math-fit-fitslicesy)
532+
set(math-foam-foam_demopers-depends tutorial-math-foam-foam_demo)
533533
set(tree-tree502_staff-depends tutorial-tree-tree500_cernbuild)
534534
set(tree-tree501_cernstaff-depends tutorial-tree-tree500_cernbuild)
535535
set(hist-hbars-depends tutorial-tree-tree500_cernbuild)
536536
set(benchmarks-depends tutorial-hsimple
537-
tutorial-fit-fit1
538-
tutorial-fit-myfit
537+
tutorial-math-fit-fit1
538+
tutorial-math-fit-myfit
539539
tutorial-hist-h1ReadAndDraw
540540
tutorial-hist-FirstContour
541541
tutorial-geom-na49view
@@ -863,8 +863,8 @@ if(ROOT_pyroot_FOUND)
863863
file(GLOB requires_numpy RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
864864
dataframe/df026_AsNumpyArrays.py
865865
dataframe/df032_RDFFromNumpy.py
866-
fit/combinedFit.py
867-
fit/multifit.py
866+
math/fit/combinedFit.py
867+
math/fit/multifit.py
868868
roofit/rf409_NumPyPandasToRooFit.py)
869869
file(GLOB requires_numba RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} pyroot/pyroot004_NumbaDeclare.py)
870870
file(GLOB requires_pandas RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}

tutorials/index.md

Lines changed: 16 additions & 24 deletions
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/// \file
2-
/// \ingroup tutorial_math
2+
/// \ingroup tutorial_math_legacy
33
/// \notebook -nodraw
44
/// Example macro of using the TFeldmanCousins class in root.
55
///
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/// \file
2-
/// \ingroup tutorial_math
2+
/// \ingroup tutorial_math_legacy
33
/// \notebook -nodraw
44
/// Example of the usage of the TRolke class
55
/// The TRolke class computes the profile likelihood

tutorials/legacy/math/index.md

Lines changed: 3 additions & 0 deletions

0 commit comments

Comments
 (0)