Skip to content

Commit

Permalink
Merge branch 'master' of github.com:jdtuck/fdasrvf_R
Browse files Browse the repository at this point in the history
  • Loading branch information
jdtuck committed Nov 16, 2023
2 parents 7ca5731 + 56ded3e commit f09e385
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion R/geometry.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,13 @@ l2_curvenorm <- function(psi, time=seq(0,1,length.out=ncol(psi))){
#' @keywords srvf alignment
#' @export
inv_exp_map<-function(Psi, psi){
theta <- acos(inner_product(Psi,psi))
ip <- inner_product(Psi, psi)
if(ip < -1){
ip = -1
}else if(ip > 1){
ip = 1
}
theta <- acos(ip)

if (theta < 1e-10){
exp_inv = rep(0,length(psi))
Expand Down

0 comments on commit f09e385

Please sign in to comment.