Skip to main content

Timeline for Find zero crossing in a list

Current License: CC BY-SA 3.0

8 events
when toggle format what by license comment
S Apr 17, 2015 at 21:25 history suggested David Zhang CC BY-SA 3.0
Implemented rm -rf's suggestion to rewrite the definition of `v`
Apr 17, 2015 at 21:23 review Suggested edits
S Apr 17, 2015 at 21:25
Sep 14, 2012 at 20:55 comment added whuber @Artes Perhaps it looks involved due to the way I present the algorithm (which is intended to clarify its working and assure correctness rather than for optimizing speed). For a more compact rendering of this algorithm--which I think compares favorably in length to other solutions that have been offered--check out Mr Wizard's answer.
Sep 14, 2012 at 17:40 vote accept dthor
Sep 14, 2012 at 17:25 comment added rm -rf v can be written as SplitBy[u, First]
Sep 14, 2012 at 17:15 comment added Artes It seems like the solution (a bit involved though) +1.
Sep 14, 2012 at 16:53 comment added whuber I recently had to solve exactly this problem for a computational geometry algorithm: gis.stackexchange.com/a/33449/664. It was necessary to identify transverse crossings of a polygon's boundary with a horizontal line (for a line-sweep algorithm). Although the numbers would be floats, it is nevertheless likely in some applications that (long) sequences of zeros could occur.
Sep 14, 2012 at 16:49 history answered whuber CC BY-SA 3.0