Commit 1c82c383 authored by Facundo Muñoz's avatar Facundo Muñoz ®️
Browse files

bugfix: logical verification

parent 22deb5fa
......@@ -26,7 +26,10 @@
compute_weights <- function(x) {
is.reciprocal <- function(x) {
all(diag(x) == 1) && (!any(lower.tri(x)) || x[lower.tri(x)]*x[upper.tri(x)] == 1)
all(diag(x) == 1) && (
!any(lower.tri(x)) || # case dim(x) = (1, 1)
all(x[lower.tri(x)]*x[upper.tri(x)] == 1)
)
}
stopifnot(
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment