Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inline stats functions to be generic #418

Merged
merged 5 commits into from
Aug 14, 2018
Merged

Inline stats functions to be generic #418

merged 5 commits into from
Aug 14, 2018

Conversation

zyzhu
Copy link
Contributor

@zyzhu zyzhu commented Aug 13, 2018

Attempt to address issue #410

  1. In order to change functions to be inline, I have to remove internal attribute for StatsHelper function. Otherwise I got error message. "error FS1113: The value 'mean' was marked inline but its implementation makes use of an internal or private function which is not sufficiently accessible" It's similar to https://github.com/hedgehogqa/fsharp-hedgehog/blob/master/src/Hedgehog/Range.fs#L94. Hence I renamed StatsHelper to be StatsInternal.
  2. Basic stats functions and level stats functions shall work for int, decimal and float now. The function outputs are still float no matter what input type is.
  3. I cannot make expanding window and moving window functions work. Both cases call applySeriesProj. But applySeriesProj has to be internal as it's calling other internal functions. I assume it's because of series.VectorBuilder as it's an internal member. @tpetricek Any idea how to get around it?

@zyzhu
Copy link
Contributor Author

zyzhu commented Aug 13, 2018

I've figured out how to make expanding/moving window function inline. I removed both internal and inline attribute for applySeriesProj and it works smooth afterwards.

@zyzhu zyzhu merged commit a13f693 into fslaborg:master Aug 14, 2018
@zyzhu zyzhu deleted the issue-410 branch August 14, 2018 12:33
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.

1 participant