FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

frollvar and frollsd by jangorecki · Pull Request #7361 · Rdatatable/data.table · GitHub

frollvar and frollsd - #7361

Merged
jangorecki merged 8 commits into
masterfrom
froll-var-sd
Oct 19, 2025
Merged

jangorecki merged 8 commits into
masterfrom
froll-var-sd

Conversation

jangorecki commented Oct 13, 2025
edited
Loading

Copy link
Copy Markdown
Member

closes #2778

library(roll)
library(data.table)
set.seed(108)
x = rnorm(1e8)
n = 1e3
system.time(ans1 <- roll_var(x, n))
#   user  system elapsed 
#  3.296   0.561   3.858 
system.time(ans2 <- frollvar(x, n))
#   user  system elapsed 
#  1.421   0.230   1.652 
all.equal(ans1, ans2) && all.equal(ans1, ans3)
#[1] TRUE

codecov Bot commented Oct 13, 2025
edited
Loading

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.12%. Comparing base (55b0de6) to head (c2c5bde).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff            @@
##           master    #7361    +/-   ##
========================================
  Coverage   99.11%   99.12%            
========================================
  Files          85       85            
  Lines       16443    16589   +146     
========================================
+ Hits        16298    16444   +146     
  Misses        145      145            

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This comment was marked as resolved.

This comment was marked as resolved.

Comment thread src/froll.c
Comment thread src/froll.c Outdated

Copy link
Copy Markdown
Member

LGTM but I would either move CLAMP0(x) to data.table.h or use MAX(0,x) (which is also defined in data.table.h)

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

rolling functions, rolling aggregates, sliding window, moving average

3 participants


Back | FazBrowse Home | New Git URL