Reputation
971
Next privilege 1,000 Rep.
See votes, expandable usercard
Badges
4 21
Newest
 Tag Editor
Impact
~23k people reached

Dec
17
accepted Assemble rule replacement from pairs of positions
Dec
16
comment Assemble rule replacement from pairs of positions
@kuba no concern about answer. I am waiting to accept in case I get an answer that builds the sparse array directly so I can compare timings
Dec
16
revised Assemble rule replacement from pairs of positions
added 6 characters in body
Dec
16
comment Assemble rule replacement from pairs of positions
@kuba The sparse Array is representing a signal I am processing. The positions places where the signal is "on" get 1's in the sparse array and the positions where the signal is "off" get zeros. The positions i'm inputting into this function are the range of positions that the signal is "on". So the coordinates { {5,10}, {12,12} } indicates that the signal was off from frame 1-4. On from 5-10. Off at 11. and On at 12. The length of the sparse array should be the length of signal I am processing. In this example all my signals have length of 300.
Dec
15
asked Assemble rule replacement from pairs of positions
Dec
15
revised Problem with Conditionals: Why does mathematica add an extra empty list to my output
added 206 characters in body
Dec
15
accepted Problem with Conditionals: Why does mathematica add an extra empty list to my output
Dec
14
comment Problem with Conditionals: Why does mathematica add an extra empty list to my output
This returns an empty list, when it should return {11,22}, because the sum from list[[12;;19]] is >1. I think this happens because of the non-sequential positions in the list
Dec
14
comment Problem with Conditionals: Why does mathematica add an extra empty list to my output
pos = {{11,22}, {270, 270}, {291, 291}}
Dec
14
comment Problem with Conditionals: Why does mathematica add an extra empty list to my output
list = SparseArray[# -> 1 & /@ {12, 13, 14, 15, 16, 17, 18, 19}, 302]
Dec
14
comment Problem with Conditionals: Why does mathematica add an extra empty list to my output
@eldo I noticed the tstFunc here has a bug in a special case, where pos has an element that looks like {2,2}', indicating that we should only look at position 2` in high array, and evaluate that there is a '1' in that position. i'm not sure how to fix it.
Dec
14
accepted Timing and memory use is critical:fast partitioning of binary sparse array
Dec
11
comment Problem with Conditionals: Why does mathematica add an extra empty list to my output
So far yours is the fastest eldo. Very clever solution to, avoiding If all together.
Dec
11
revised Problem with Conditionals: Why does mathematica add an extra empty list to my output
added 101 characters in body
Dec
11
comment Problem with Conditionals: Why does mathematica add an extra empty list to my output
@Xavier it works. Adding the timing to the question now.
Dec
11
comment Problem with Conditionals: Why does mathematica add an extra empty list to my output
@Xavier I tried your function and it did not work for me. I must be putting in the arguments in correctly.
Dec
11
revised Problem with Conditionals: Why does mathematica add an extra empty list to my output
Compared answers timing.
Dec
11
comment Problem with Conditionals: Why does mathematica add an extra empty list to my output
@george2079 Thanks for this. highArray is a sparse array. Now I have edited.
Dec
11
revised Problem with Conditionals: Why does mathematica add an extra empty list to my output
added 52 characters in body
Dec
11
revised timing wiki excerpt
added 151 characters in body