Skip to content

Commit

Permalink
Merge pull request #7 from WolfLink/patch-1
Browse files Browse the repository at this point in the history
matrix_distance_squared_jac off by a factor
  • Loading branch information
edyounis authored Oct 27, 2022
2 parents 81d19ac + d72e027 commit 4467ef3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ pub fn matrix_distance_squared_jac(
.collect();
let jacs = jus
.iter()
.map(|jusi| -(jusi.re * s.re + jusi.im * s.im) * size as f64 / s.norm())
.map(|jusi| -(jusi.re * s.re + jusi.im * s.im) / (size as f64 * s.norm()))
.collect();
(dsq, jacs)
}
Expand Down

0 comments on commit 4467ef3

Please sign in to comment.