From be9c850cc531227e46d359d12f957911fd66365e Mon Sep 17 00:00:00 2001 From: GFabien Date: Wed, 22 May 2024 18:22:35 +0200 Subject: [PATCH] Remove double square root --- R/block_project.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/block_project.R b/R/block_project.R index d587b644..48eeca50 100644 --- a/R/block_project.R +++ b/R/block_project.R @@ -31,7 +31,7 @@ block_project.dual_block <- function(x) { #' @export block_project.primal_regularized_block <- function(x) { if (any(x$a != 0)) { - a_norm <- sqrt(t(x$a) %*% x$M %*% x$a) + a_norm <- t(x$a) %*% x$M %*% x$a if (a_norm > 0) { x$a <- x$M %*% x$a / drop(sqrt(a_norm)) } else {