Interface for extracting xyShape. #970
NunoSempere
started this conversation in
Squiggle Improvement Proposal
Replies: 2 comments 1 reply
-
|
Kudos for writing this up so specifically. This proposal seems pretty reasonable to me and doesn't seem to be missing anything (that to me) is obvious. |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
I think mapX() could help here, but there are tricky edge cases to consider. #973 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I want to be able to manipulate xyShapes, in order to do certain types of computations (see here).
One naïve way of doing this would be to have:
However, Ozzie points out that pointsets could be Continuous, Discrete, or mixed.
Given this, we could have
A general interface
Which could look like:
or like
I think I prefer the second option because checking for the existence of an object property within Squiggle might be annoying, but checking if a list is empty would be easier.
An interface for each pointSet type
For continuous:
For discrete:
For mixed:
One problem with this second option is that fragmenting this would make it more difficult to write general functions that manipulate any kind of pointSetDist. Overall I feel more partial about the first option.
Beta Was this translation helpful? Give feedback.
All reactions