Workflow: Handling discretized aggregations #2050
Replies: 2 comments
-
Thoughts:
|
Beta Was this translation helpful? Give feedback.
-
Just thinking - |
Beta Was this translation helpful? Give feedback.
-
Thoughts:
|
Beta Was this translation helpful? Give feedback.
-
Just thinking - |
Beta Was this translation helpful? Give feedback.
-
One common workflow is something like,
Arguably, it would be better if this person would find an analytical solution to this to solve for each point in time, but sometimes this is a burden.
Here's some code that can do one version of this, but is of course sort of clunky (
reduce
takes some getting used to)I imagine the first thing we want is some Plot function that can show discrete values. It's given some data like:
And plots this.
The second challenge is finding improved functions for organizing this sort of thing. In theory, we could have a special function type that knows it's supposed to aggregate/memoize results, though this would probably be work.
One functional way of doing this might be something like,
... but this would be tricky, if we want to reset the memoization for a few different full runs.
Beta Was this translation helpful? Give feedback.
All reactions