Skip to content

Commit c6ebea0

Browse files
Code clean up
1 parent 1040447 commit c6ebea0

12 files changed

+19
-6
lines changed

src/allan.f90

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
submodule (fstats) allan
22
use fstats_errors
3+
implicit none
34
contains
45
! ------------------------------------------------------------------------------
56
! REF: Yadav, Shrikanth & Shastri, Saurav & Chakravarthi, Ghanashyam & Kumar,

src/distributions_chisquared.f90

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
submodule (fstats) distributions_chisquared
2+
implicit none
23
contains
34
! ------------------------------------------------------------------------------
45
pure module elemental function cs_pdf(this, x) result(rst)

src/distributions_f.f90

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
submodule (fstats) distributions_f
22
use ieee_arithmetic
3+
implicit none
34
contains
45
! ------------------------------------------------------------------------------
56
pure module elemental function fd_pdf(this, x) result(rst)

src/distributions_normal.f90

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
submodule (fstats) distributions_normal
2+
implicit none
23
real(real64), parameter :: pi = 2.0d0 * acos(0.0d0)
34
contains
45
! ------------------------------------------------------------------------------

src/distributions_t.f90

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
submodule (fstats) distributions_t
22
use ieee_arithmetic
3+
implicit none
34
real(real64), parameter :: pi = 2.0d0 * acos(0.0d0)
45
contains
56
! ------------------------------------------------------------------------------

src/experimental_design_implementation.f90

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
submodule (fstats) experimental_design_implementation
22
use fstats_errors
3+
implicit none
34
contains
45
! ------------------------------------------------------------------------------
56
module subroutine get_full_factorial_matrix_size_int32(vars, m, n, err)

src/levenberg_marquardt.f90

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
! 1. https://people.duke.edu/~hpgavin/ExperimentalSystems/lm.pdf
44
use linalg
55
use fstats_errors
6+
implicit none
67
contains
78
! ------------------------------------------------------------------------------
89
module subroutine regression_jacobian_1(fun, xdata, params, &
@@ -803,7 +804,7 @@ subroutine lm_solve(fun, xdata, ydata, p, weights, maxP, minP, controls, &
803804
allocate(character(len = 512) :: errmsg)
804805
write(errmsg, 100) "Memory allocation error code ", flag, "."
805806
call err%report_error("lm_solve", &
806-
trim(errmsg), ML_OUT_OF_MEMORY_ERROR)
807+
trim(errmsg), FS_MEMORY_ERROR)
807808
return
808809

809810
! Formatting

src/regression_implementation.f90

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
submodule (fstats) regression_implementation
22
use linalg
33
use fstats_errors
4+
implicit none
45
contains
56
! ------------------------------------------------------------------------------
67
module subroutine coefficient_matrix_real64(order, intercept, x, c, err)

src/special_functions_beta.f90

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
submodule (fstats) special_functions_beta
2+
implicit none
23
contains
34
! ------------------------------------------------------------------------------
45
pure elemental module function beta_real64(a, b) result(rst)

src/special_functions_digamma.f90

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
submodule (fstats) special_functions_digamma
22
use ieee_arithmetic
3+
implicit none
34
contains
45
! ------------------------------------------------------------------------------
56
pure elemental module function digamma_real64(x) result(rst)

src/special_functions_gamma.f90

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
submodule (fstats) special_functions_gamma
22
use ieee_arithmetic
3+
implicit none
34
contains
45
! ------------------------------------------------------------------------------
56
! REF: https://people.math.sc.edu/Burkardt/f_src/special_functions/special_functions.f90

src/statistics_implementation.f90

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
use linalg, only : sort
33
use ieee_arithmetic
44
use fstats_errors
5+
implicit none
56
contains
67
! ------------------------------------------------------------------------------
78
pure module function mean_real64(x) result(rst)
@@ -346,7 +347,7 @@ pure module function quantile_real64(x, q) result(rst)
346347
real(real64), parameter :: one = 1.0d0
347348

348349
! Local Variables
349-
real(real64) :: a, b, c
350+
real(real64) :: a, b, c, tol
350351
integer(int32) :: n, ib
351352

352353
! Initialization
@@ -376,7 +377,7 @@ pure module function quantile_real32(x, q) result(rst)
376377
real(real32), parameter :: one = 1.0
377378

378379
! Local Variables
379-
real(real32) :: a, b, c
380+
real(real32) :: a, b, c, tol
380381
integer(int32) :: n, ib
381382

382383
! Initialization
@@ -614,7 +615,7 @@ module subroutine t_test_paired_real64(x1, x2, stat, p, dof, err)
614615
class(errors), pointer :: errmgr
615616
type(errors), target :: deferr
616617
real(real64) :: v1, v2, m1, m2, sd, cov, a, b, x
617-
integer(int32) :: n1, n2, n
618+
integer(int32) :: i, n1, n2, n
618619

619620
! Initialization
620621
if (present(err)) then
@@ -671,7 +672,7 @@ module subroutine t_test_paired_real32(x1, x2, stat, p, dof, err)
671672
class(errors), pointer :: errmgr
672673
type(errors), target :: deferr
673674
real(real32) :: v1, v2, m1, m2, sd, cov, a, b, x
674-
integer(int32) :: n1, n2, n
675+
integer(int32) :: i, n1, n2, n
675676

676677
! Initialization
677678
if (present(err)) then
@@ -881,7 +882,7 @@ module function anova_2_factor(x) result(rst)
881882

882883
! Local Variables
883884
integer(int32) :: i, j, jj, k, r, n
884-
real(real64) :: factorMean
885+
real(real64) :: factorMean, sum_all
885886
real(real64), allocatable :: xpack(:)
886887

887888
! Initialization
@@ -994,6 +995,7 @@ module function anova_model_fit(nmodelparams, ymeas, ymod, err) result(rst)
994995
! Local Variables
995996
integer(int32) :: n, flag
996997
real(real64), allocatable :: ypack(:)
998+
real(real64) :: sum_all
997999
class(errors), pointer :: errmgr
9981000
type(errors), target :: deferr
9991001

0 commit comments

Comments
 (0)