jdtuck / fdasrvf_R

Functional Data Analysis using Square-Root Slope Framework
10 stars 13 forks source link

Add Yi's code to fdasrvf_R #4

Closed ahfoss closed 6 years ago

ahfoss commented 6 years ago

Creat a function based on Yi's code, pair_align_functions_expomap(). Replace computationally intensive subroutines with Rcpp code, achieving about a 10x speedup. Other code has not been modified, and is still messy, but is probably not causing any significant slowdowns in performance.

Some issues in the original code that I did not address but could be improved:

  1. time (x) gets passed around along with the actual function values (y) as lists. This could be simplified.
  2. The original code has many unnecessary sorting operations. I replaced most sorts with C++, but I believe most of these can be eliminated
  3. The main function still relies heavily on Yi's original functions for basic operations. These should be integrated more tightly with existing fdasrvf package functions (e.g. replace Q and Qinv)