Skip to content

Commit

Permalink
update distribution wrappers for newly introduced tls* functions
Browse files Browse the repository at this point in the history
  • Loading branch information
pr0m1th3as committed Feb 9, 2024
1 parent cc68c31 commit 27bc669
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions inst/cdf.m
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
## @item @qcode{"Rayleigh"} @tab @tab @qcode{"rayl"} @tab @tab 1
## @item @qcode{"Rician"} @tab @tab @qcode{"rice"} @tab @tab 2
## @item @qcode{"Student T"} @tab @tab @qcode{"t"} @tab @tab 1
## @item @qcode{"location-scale T"} @tab @tab @qcode{"tls"} @tab @tab 3
## @item @qcode{"Triangular"} @tab @tab @qcode{"tri"} @tab @tab 3
## @item @qcode{"Discrete Uniform"} @tab @tab @qcode{"unid"} @tab @tab 1
## @item @qcode{"Uniform"} @tab @tab @qcode{"unif"} @tab @tab 2
Expand Down Expand Up @@ -135,6 +136,7 @@
{"rayl" , "Rayleigh"}, @raylcdf, 1, ...
{"rice" , "Rician"}, @ricecdf, 2, ...
{"t" , "Student T"}, @tcdf, 1, ...
{"tls" , "location-scale T"}, @tlscdf, 3, ...
{"tri" , "Triangular"}, @tricdf, 3, ...
{"unid" , "Discrete Uniform"}, @unidcdf, 1, ...
{"unif" , "Uniform"}, @unifcdf, 2, ...
Expand Down Expand Up @@ -268,6 +270,8 @@
%!assert (cdf ("rice", x, 5, 1, "upper"), ricecdf (x, 5, 1, "upper"))
%!assert (cdf ("Student T", x, 5), tcdf (x, 5))
%!assert (cdf ("t", x, 5, "upper"), tcdf (x, 5, "upper"))
%!assert (cdf ("location-scale T", x, 5, 1, 2), tlscdf (x, 5, 1, 2))
%!assert (cdf ("tls", x, 5, 1, 2, "upper"), tlscdf (x, 5, 1, 2, "upper"))
%!assert (cdf ("Triangular", x, 5, 2, 2), tricdf (x, 5, 2, 2))
%!assert (cdf ("tri", x, 5, 2, 2, "upper"), tricdf (x, 5, 2, 2, "upper"))
%!assert (cdf ("Discrete Uniform", x, 5), unidcdf (x, 5))
Expand Down
4 changes: 4 additions & 0 deletions inst/icdf.m
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
## @item @qcode{"Rayleigh"} @tab @tab @qcode{"rayl"} @tab @tab 1
## @item @qcode{"Rician"} @tab @tab @qcode{"rice"} @tab @tab 2
## @item @qcode{"Student T"} @tab @tab @qcode{"t"} @tab @tab 1
## @item @qcode{"location-scale T"} @tab @tab @qcode{"tls"} @tab @tab 3
## @item @qcode{"Triangular"} @tab @tab @qcode{"tri"} @tab @tab 3
## @item @qcode{"Discrete Uniform"} @tab @tab @qcode{"unid"} @tab @tab 1
## @item @qcode{"Uniform"} @tab @tab @qcode{"unif"} @tab @tab 2
Expand Down Expand Up @@ -127,6 +128,7 @@
{"rayl" , "Rayleigh"}, @raylinv, 1, ...
{"rice" , "Rician"}, @riceinv, 2, ...
{"t" , "Student T"}, @tinv, 1, ...
{"tls" , "location-scale T"}, @tlsinv, 3, ...
{"tri" , "Triangular"}, @triinv, 3, ...
{"unid" , "Discrete Uniform"}, @unidinv, 1, ...
{"unif" , "Uniform"}, @unifinv, 2, ...
Expand Down Expand Up @@ -246,6 +248,8 @@
%!assert (icdf ("rice", p, 5, 1), riceinv (p, 5, 1))
%!assert (icdf ("Student T", p, 5), tinv (p, 5))
%!assert (icdf ("t", p, 5), tinv (p, 5))
%!assert (icdf ("location-scale T", p, 5, 1, 2), tlsinv (p, 5, 1, 2))
%!assert (icdf ("tls", p, 5, 1, 2), tlsinv (p, 5, 1, 2))
%!assert (icdf ("Triangular", p, 5, 2, 2), triinv (p, 5, 2, 2))
%!assert (icdf ("tri", p, 5, 2, 2), triinv (p, 5, 2, 2))
%!assert (icdf ("Discrete Uniform", p, 5), unidinv (p, 5))
Expand Down
4 changes: 4 additions & 0 deletions inst/pdf.m
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
## @item @qcode{"Rayleigh"} @tab @tab @qcode{"rayl"} @tab @tab 1
## @item @qcode{"Rician"} @tab @tab @qcode{"rice"} @tab @tab 2
## @item @qcode{"Student T"} @tab @tab @qcode{"t"} @tab @tab 1
## @item @qcode{"location-scale T"} @tab @tab @qcode{"tls"} @tab @tab 3
## @item @qcode{"Triangular"} @tab @tab @qcode{"tri"} @tab @tab 3
## @item @qcode{"Discrete Uniform"} @tab @tab @qcode{"unid"} @tab @tab 1
## @item @qcode{"Uniform"} @tab @tab @qcode{"unif"} @tab @tab 2
Expand Down Expand Up @@ -128,6 +129,7 @@
{"rayl" , "Rayleigh"}, @raylpdf, 1, ...
{"rice" , "Rician"}, @ricepdf, 2, ...
{"t" , "Student T"}, @tpdf, 1, ...
{"tls" , "location-scale T"}, @tlspdf, 3, ...
{"tri" , "Triangular"}, @tripdf, 3, ...
{"unid" , "Discrete Uniform"}, @unidpdf, 1, ...
{"unif" , "Uniform"}, @unifpdf, 2, ...
Expand Down Expand Up @@ -247,6 +249,8 @@
%!assert (pdf ("rice", x, 5, 1), ricepdf (x, 5, 1))
%!assert (pdf ("Student T", x, 5), tpdf (x, 5))
%!assert (pdf ("t", x, 5), tpdf (x, 5))
%!assert (pdf ("location-scale T", x, 5, 1, 2), tlspdf (x, 5, 1, 2))
%!assert (pdf ("tls", x, 5, 1, 2), tlspdf (x, 5, 1, 2))
%!assert (pdf ("Triangular", x, 5, 2, 2), tripdf (x, 5, 2, 2))
%!assert (pdf ("tri", x, 5, 2, 2), tripdf (x, 5, 2, 2))
%!assert (pdf ("Discrete Uniform", x, 5), unidpdf (x, 5))
Expand Down
4 changes: 4 additions & 0 deletions inst/random.m
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
## @item @qcode{"Rayleigh"} @tab @tab @qcode{"rayl"} @tab @tab 1
## @item @qcode{"Rician"} @tab @tab @qcode{"rice"} @tab @tab 2
## @item @qcode{"Student T"} @tab @tab @qcode{"t"} @tab @tab 1
## @item @qcode{"location-scale T"} @tab @tab @qcode{"tls"} @tab @tab 3
## @item @qcode{"Triangular"} @tab @tab @qcode{"tri"} @tab @tab 3
## @item @qcode{"Discrete Uniform"} @tab @tab @qcode{"unid"} @tab @tab 1
## @item @qcode{"Uniform"} @tab @tab @qcode{"unif"} @tab @tab 2
Expand Down Expand Up @@ -126,6 +127,7 @@
{"rayl" , "Rayleigh"}, @raylrnd, 1, ...
{"rice" , "Rician"}, @ricernd, 2, ...
{"t" , "Student T"}, @trnd, 1, ...
{"tls" , "location-scale T"}, @tlsrnd, 3, ...
{"tri" , "Triangular"}, @trirnd, 3, ...
{"unid" , "Discrete Uniform"}, @unidrnd, 1, ...
{"unif" , "Uniform"}, @unifrnd, 2, ...
Expand Down Expand Up @@ -244,6 +246,8 @@
%!assert (size (random ("rice", 5, 1, [10, 20])), size (ricernd (5, 1, 10, 20)))
%!assert (size (random ("Student T", 5, [10, 20])), size (trnd (5, 10, 20)))
%!assert (size (random ("t", 5, [10, 20])), size (trnd (5, 10, 20)))
%!assert (size (random ("location-scale T", 5, 1, 2, [10, 20])), size (tlsrnd (5, 1, 2, 10, 20)))
%!assert (size (random ("tls", 5, 1, 2, [10, 20])), size (tlsrnd (5, 1, 2, 10, 20)))
%!assert (size (random ("Triangular", 5, 2, 2, [10, 20])), size (trirnd (5, 2, 2, 10, 20)))
%!assert (size (random ("tri", 5, 2, 2, [10, 20])), size (trirnd (5, 2, 2, 10, 20)))
%!assert (size (random ("Discrete Uniform", 5, [10, 20])), size (unidrnd (5, 10, 20)))
Expand Down

0 comments on commit 27bc669

Please sign in to comment.