fsml_utl Module

Utilities/helper module.


Uses

  • module~~fsml_utl~~UsesGraph module~fsml_utl fsml_utl module~fsml_con fsml_con module~fsml_utl->module~fsml_con module~fsml_ini fsml_ini module~fsml_utl->module~fsml_ini module~fsml_con->module~fsml_ini ieee_arithmetic ieee_arithmetic module~fsml_ini->ieee_arithmetic iso_fortran_env iso_fortran_env module~fsml_ini->iso_fortran_env stdlib_linalg stdlib_linalg module~fsml_ini->stdlib_linalg

Used by

  • module~~fsml_utl~~UsedByGraph module~fsml_utl fsml_utl module~fsml fsml module~fsml->module~fsml_utl module~fsml_dat fsml_dat module~fsml->module~fsml_dat module~fsml_dst fsml_dst module~fsml->module~fsml_dst module~fsml_lin fsml_lin module~fsml->module~fsml_lin module~fsml_nlp fsml_nlp module~fsml->module~fsml_nlp module~fsml_sts fsml_sts module~fsml->module~fsml_sts module~fsml_tst fsml_tst module~fsml->module~fsml_tst module~fsml_dat->module~fsml_utl module~fsml_dst->module~fsml_utl module~fsml_err fsml_err module~fsml_dst->module~fsml_err module~fsml_err->module~fsml_utl module~fsml_lin->module~fsml_utl module~fsml_lin->module~fsml_err module~fsml_lin->module~fsml_sts module~fsml_nlp->module~fsml_utl module~fsml_nlp->module~fsml_err module~fsml_nlp->module~fsml_lin module~fsml_nlp->module~fsml_sts module~fsml_sts->module~fsml_utl module~fsml_sts->module~fsml_err module~fsml_tst->module~fsml_utl module~fsml_tst->module~fsml_dst module~fsml_tst->module~fsml_err module~fsml_tst->module~fsml_sts

Functions

public pure elemental function f_utl_assign_nan() result(x)

Return quiet NaN.

Arguments

None

Return Value real(kind=wp)

public function f_utl_c2r(c) result(r)

Converts char to real.

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: c

Return Value real(kind=wp)

public function f_utl_i2c(i) result(c)

Convert integer to char.

Arguments

Type IntentOptional Attributes Name
integer(kind=i4), intent(in) :: i

Return Value character(len=256)

public pure function f_utl_is_nan(x) result(res)

Returns true if is NaN.

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: x

Return Value logical

public function f_utl_r2c(r) result(c)

Convert real to char.

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: r

Return Value character(len=256)

public pure function s_utl_cholesky_solve(a, b, n) result(x)

Solve a * x = b for x using Cholesky factor returned by stdlib's chol(). a : (n,n) symmetric positive-definite b : (n)

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: a(n,n)

input square matrix, symmetric positive-definite

real(kind=wp), intent(in) :: b(n)

input right-hand side vector (n)

integer(kind=i4), intent(in) :: n

length of vectors

Return Value real(kind=wp), (n)

output solution vector (n)


Subroutines

public pure subroutine s_utl_rank(x, ranks)

Ranks all samples such that the smallest value obtains rank 1 and the largest rank n. Handles tied ranks and assigns average rank to tied elements within one group of tied elements.

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: x(:)

x array

real(kind=wp), intent(out), allocatable :: ranks(:)

ranks of x

public pure subroutine s_utl_sort(a_in, n, mode, idx_in, a_out, idx_out)

Sort real array in ascending (mode=1) or descending (mode=2) order. Preserves the input array. Outputs sorted array and index mapping.

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: a_in(n)

input array (unchanged)

integer(kind=i4), intent(in) :: n

number of elements

integer(kind=i4), intent(in) :: mode

1=ascending, 2=descending

integer(kind=i4), intent(in) :: idx_in(n)

initial index mapping

real(kind=wp), intent(out) :: a_out(n)

sorted output array

integer(kind=i4), intent(out) :: idx_out(n)

updated index mapping