diff --git a/DESCRIPTION b/DESCRIPTION index e7d6924..c8c30cc 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -2,7 +2,7 @@ Package: seriation Type: Package Title: Infrastructure for Ordering Objects Using Seriation Version: 1.5.6 -Date: 2024-08-13 +Date: 2024-08-19 Authors@R: c( person("Michael", "Hahsler", role = c("aut", "cre", "cph"), email = "mhahsler@lyle.smu.edu", diff --git a/NEWS.md b/NEWS.md index 453ef76..f887b75 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# seriation 1.5.6 (08/13/2024) +# seriation 1.5.6 (08/19/2024) ## New Features - Added registered_by field to registries. @@ -7,6 +7,7 @@ - We replaced the FORTRAN implementation for BEA with code from package TSP. - ME is now calculated using C code. - optimal.c: updated memory allocation to R allocation. +- stress.c: updated memory allocation to R allocation. ## Bug Fixes - Added two missing package anchors to palette man page. diff --git a/R/AAA_color_palette.R b/R/AAA_color_palette.R index aa37f44..2dd46c1 100644 --- a/R/AAA_color_palette.R +++ b/R/AAA_color_palette.R @@ -30,7 +30,7 @@ #' The two diverging palettes are: `bluered()` and `greenred()`. #' #' @name palette -#' @aliases palette, colors +#' @aliases palette colors #' @family plots #' #' @param n number of different colors produces. diff --git a/R/AAA_seriation-package.R b/R/AAA_seriation-package.R index 36dad8b..06331e5 100644 --- a/R/AAA_seriation-package.R +++ b/R/AAA_seriation-package.R @@ -4,9 +4,9 @@ #' - Seriation: [seriate()], [criterion()], [get_order()], [permute()] #' - Visualization: [pimage()], [bertinplot()], [hmap()], [dissplot()], [VAT()] #' -#' @section Available seriation methods: +#' @section Available seriation methods and criteria: #' * [A list with the implemented seriation methods](https://mhahsler.github.io/seriation/seriation_methods.html) -#' * [A visual comparison between seriation methods](https://mhahsler.github.io/seriation/visual_comparison.html) +#' * [A visual comparison between seriation methods](https://mhahsler.github.io/seriation/comparison.html) #' * [A list with the implemented seriation criteria](https://mhahsler.github.io/seriation/seriation_criteria.html) #' #' @section Quickstart guides: diff --git a/man/palette.Rd b/man/palette.Rd index 7179e6c..d736eb3 100644 --- a/man/palette.Rd +++ b/man/palette.Rd @@ -3,7 +3,6 @@ \name{palette} \alias{palette} \alias{bluered} -\alias{palette,} \alias{colors} \alias{greenred} \alias{reds} diff --git a/man/seriation-package.Rd b/man/seriation-package.Rd index f9f1c07..47477f4 100644 --- a/man/seriation-package.Rd +++ b/man/seriation-package.Rd @@ -16,11 +16,11 @@ Infrastructure for ordering objects with an implementation of several seriation/ } } -\section{Available seriation methods}{ +\section{Available seriation methods and criteria}{ \itemize{ \item \href{https://mhahsler.github.io/seriation/seriation_methods.html}{A list with the implemented seriation methods} -\item \href{https://mhahsler.github.io/seriation/visual_comparison.html}{A visual comparison between seriation methods} +\item \href{https://mhahsler.github.io/seriation/comparison.html}{A visual comparison between seriation methods} \item \href{https://mhahsler.github.io/seriation/seriation_criteria.html}{A list with the implemented seriation criteria} } } diff --git a/src/stress.c b/src/stress.c index de79f46..e53fddc 100644 --- a/src/stress.c +++ b/src/stress.c @@ -164,8 +164,8 @@ SEXP stress(SEXP R_x, SEXP R_r, SEXP R_c, SEXP R_type) * this sucks! */ - r = Calloc(nr, int); - c = Calloc(nc, int); + r = R_Calloc(nr, int); + c = R_Calloc(nc, int); /* copy and shift indexes */ @@ -187,12 +187,12 @@ SEXP stress(SEXP R_x, SEXP R_r, SEXP R_c, SEXP R_type) [0] = stressNeumann(REAL(R_x), r, c, nr, nc, nrx); break; default: - Free(r); - Free(c); + R_Free(r); + R_Free(c); error("stress: type not implemented"); } - Free(r); - Free(c); + R_Free(r); + R_Free(c); /* UNPROTECT(3); */ UNPROTECT(1); @@ -372,8 +372,8 @@ SEXP stress_dist(SEXP R_x, SEXP R_r, SEXP R_c, SEXP R_bycol, SEXP R_type) * this sucks! */ - r = Calloc(nr, int); - c = Calloc(nc, int); + r = R_Calloc(nr, int); + c = R_Calloc(nc, int); /* copy and shift indexes */ @@ -388,7 +388,7 @@ SEXP stress_dist(SEXP R_x, SEXP R_r, SEXP R_c, SEXP R_bycol, SEXP R_type) PROTECT(R_obj = NEW_NUMERIC(nr * (nr - 1) / 2)); d = REAL(R_obj); - t = Calloc(nr, double); + t = R_Calloc(nr, double); switch (INTEGER(R_type)[0]) { @@ -399,18 +399,18 @@ SEXP stress_dist(SEXP R_x, SEXP R_r, SEXP R_c, SEXP R_bycol, SEXP R_type) distNeumann(REAL(R_x), r, c, nr, nc, nrx, 1, d, t); break; default: - Free(r); - Free(c); - Free(t); + R_Free(r); + R_Free(c); + R_Free(t); error("stress_dist: \"type\" not implemented"); } - Free(t); + R_Free(t); break; case 1: PROTECT(R_obj = NEW_NUMERIC(nc * (nc - 1) / 2)); d = REAL(R_obj); - t = Calloc(nc, double); + t = R_Calloc(nc, double); switch (INTEGER(R_type)[0]) { @@ -421,20 +421,20 @@ SEXP stress_dist(SEXP R_x, SEXP R_r, SEXP R_c, SEXP R_bycol, SEXP R_type) distNeumann(REAL(R_x), c, r, nc, nr, 1, nrx, d, t); break; default: - Free(r); - Free(c); - Free(t); + R_Free(r); + R_Free(c); + R_Free(t); error("stress_dist: type not implemented"); } - Free(t); + R_Free(t); break; default: - Free(r); - Free(c); + R_Free(r); + R_Free(c); error("stress_dist: \"bycol\" invalid"); } - Free(r); - Free(c); + R_Free(r); + R_Free(c); /* UNPROTECT(3); */ UNPROTECT(1);