Skip to content

Commit

Permalink
Remove double square root
Browse files Browse the repository at this point in the history
  • Loading branch information
GFabien committed May 22, 2024
1 parent 3402cf9 commit be9c850
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/block_project.R
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit be9c850

Please sign in to comment.