Skip to content

Conversation

henry2004y
Copy link
Contributor

This is a PR for exploring the possibility of shifting towards the code structure of cg.jl in IterativeSolvers.jl. Compared with the current implementation, it shares the same ideas but in my view easier to follow and maintain:

  • Now there is only one struct SiftIterable for storing sifting variables, instead of one SiftIterable and one SiftState. All the input variables and intermediate variables are kept in the same place, which may make it easier to add other extensions.
  • There is only one iterate method for SiftIterable, and another sift_iterator method for initializing SiftIterable. I think this is easier to understand than two dispatched iterate methods.

Besides, I changed some parts of the variable names, e.g. maxes --> maxs, yvec --> y, but we can always make better names later.

Take a look and we can discuss more about this!

@henry2004y
Copy link
Contributor Author

Probably I should rebase instead of merge... Forgive me as a terrible git user

@coveralls
Copy link

coveralls commented May 6, 2021

Pull Request Test Coverage Report for Build 52

  • 37 of 42 (88.1%) changed or added relevant lines in 2 files are covered.
  • 10 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+3.4%) to 50.811%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/EmpiricalModeDecomposition.jl 1 6 16.67%
Files with Coverage Reduction New Missed Lines %
src/testdata.jl 4 0%
src/EmpiricalModeDecomposition.jl 6 34.21%
Totals Coverage Status
Change from base Build 49: 3.4%
Covered Lines: 94
Relevant Lines: 185

💛 - Coveralls

@henry2004y
Copy link
Contributor Author

henry2004y commented May 7, 2021

This new implementation actually does not give identical results as the original version. I need to figure out why.

The reason is that I wrote imf=y before creating SiftIterable. I should either say imf = copy(y), or imf .= y. Fixed in 2d25f77

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants