Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- double ewma(double avg, double sample, double weight)
- {
- return avg==0 ? sample : weight*avg+(1.0-weight)*sample;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement