~enricoschumann/neighbours

5738e24c95a5ba4fb578438d8f467310f1a9f604 — Enrico Schumann 2 years ago 085dbf9 v0.1-2_CRAN
Prepare version 0.1-2
4 files changed, 20 insertions(+), 10 deletions(-)

M ChangeLog
M DESCRIPTION
M inst/tinytest/test_neighbours.R
M vignettes/neighbours.Rnw
M ChangeLog => ChangeLog +10 -0
@@ 1,3 1,13 @@
2022-08-22  Enrico Schumann  <es@enricoschumann.net>

	* DESCRIPTION (Version): 0.1-2
	(Suggests): add 'quadprog', used in vignette

2022-08-19  Enrico Schumann  <es@enricoschumann.net>

        * inst/tinytest/test_neighbours.R: use more
        tolerance

2022-08-17  Enrico Schumann  <es@enricoschumann.net>

        * DESCRIPTION (Version): 0.1-1

M DESCRIPTION => DESCRIPTION +3 -3
@@ 1,8 1,8 @@
Package: neighbours
Type: Package
Title: Neighbourhood Functions for Local-Search Algorithms
Version: 0.1-1
Date: 2022-08-17
Version: 0.1-2
Date: 2022-08-22
Maintainer: Enrico Schumann <es@enricoschumann.net>
Authors@R: person(given = "Enrico", family = "Schumann",
                  role  = c("aut", "cre"),


@@ 26,4 26,4 @@ License: GPL-3
URL: http://enricoschumann.net/R/packages/neighbours/ ,
     https://sr.ht/~enricoschumann/neighbours/ ,
     https://github.com/enricoschumann/neighbours
Suggests: NMOF, tinytest
Suggests: NMOF, quadprog, tinytest

M inst/tinytest/test_neighbours.R => inst/tinytest/test_neighbours.R +6 -6
@@ 201,8 201,8 @@ for (i in 1:steps) {
    expect_true(all(round(xn - x, 8) %in% c(0, -0.01, 0.01)))
    expect_true(all(xn <= x.max))
    expect_true(all(xn >= x.min))
    expect_true(sum(xn) <= 1.2)
    expect_true(sum(xn) >= 0.8)
    expect_true(sum(xn) <= 1.2 + sqrt(.Machine$double.eps))
    expect_true(sum(xn) >= 0.8 - sqrt(.Machine$double.eps))
    expect_true(sum(xn != x) <= 1L)
    x <- xn
}


@@ 222,8 222,8 @@ for (i in 1:steps) {
    xn <- N(x)
    expect_true(all(xn <= x.max))
    expect_true(all(xn >= x.min))
    expect_true(sum(xn) <= 1.2 + 1e-12)
    expect_true(sum(xn) >= 0.8 - 1e-12)
    expect_true(sum(xn) <= 1.2 + sqrt(.Machine$double.eps))
    expect_true(sum(xn) >= 0.8 - sqrt(.Machine$double.eps))
    expect_true(sum(xn != x) <= 1L)
    x <- xn
}


@@ 242,8 242,8 @@ x <- rep(1/25, 25)
for (i in 1:steps) {
    xn <- N(x)
    expect_true(sum(xn) != sum(x))
    expect_true(all(xn >= x.min))
    expect_true(all(xn <= x.max))
    expect_true(all(xn >= x.min - sqrt(.Machine$double.eps)))
    expect_true(all(xn <= x.max + sqrt(.Machine$double.eps)))
    expect_true(sum(xn != x) <= 1L)
    x <- xn
}

M vignettes/neighbours.Rnw => vignettes/neighbours.Rnw +1 -1
@@ 128,7 128,7 @@ column_cor <- function(x, X, y)

\noindent With this objective function we can evaluate
the quality of~\texttt{x0}.
<<>>=
<<cor-x0>>=
column_cor(x0, X, y)
@