Skip to main content
19 events
when toggle format what by license comment
S Feb 3 at 2:30 history bounty ended Emanuele Nardi
S Feb 3 at 2:30 history notice removed Emanuele Nardi
S Feb 2 at 0:55 history bounty started Emanuele Nardi
S Feb 2 at 0:55 history notice added Emanuele Nardi Reward existing answer
Jan 23 at 21:17 vote accept Emanuele Nardi
Jan 22 at 23:12 history became hot network question
Jan 22 at 20:40 answer added Qrrbrbirlbel timeline score: 21
Jan 22 at 18:19 history edited Emanuele Nardi CC BY-SA 4.0
added 2 characters in body
Jan 22 at 18:15 comment added Emanuele Nardi This picture is included in a standard book class document, but I would like to later create an animation using the animate LaTeX package, which could be used both in these notes and in a Beamer presentation @Jasper
Jan 22 at 18:11 comment added Emanuele Nardi My reason for optimizing is that I would like to write cleaner and more concise code. Since I used this method throughout all the notes for drawing vectors of numbers, I think a solution with a TikZ matrix and layers, as suggested by @samcarter_is_at_topanswers.xyz, would be optimal for my scenario.
Jan 22 at 18:02 history edited Emanuele Nardi CC BY-SA 4.0
removes tikz styles not used
Jan 22 at 16:51 comment added Qrrbrbirlbel Related: Q141065
Jan 22 at 16:25 comment added Qrrbrbirlbel It seems the style of the nodes only depend on these three values. (< j : pink, j: red, > i lightgreen, i: darkgreen). Though, I don't know what happens at the last page and how it would approach from there. Shouldn't the two parts now run in parallel?
Jan 22 at 16:22 comment added Qrrbrbirlbel If you use only one path for all nodes you can set some of them behind path which will also place them behind the other nodes regardless of order in code. (Of course, there's also the whole layer system of PGF.) I'd do something like I did with the Dijkstra algorithm which outputs a state per step. That would also mean that TeX itself does the sorting. Otherwise, if you provide i, j and the number of the pivot element as well as the current order of the entries, I think we can draw this in a loop easily.
Jan 22 at 16:18 comment added Qrrbrbirlbel @samcarter_is_at_topanswers.xyz Hm, since either the positions of the nodes or their content change, many things would be dependent on the overlay number. I don't know if it will be that easy.
Jan 22 at 15:44 comment added Jasper Hmm... I would try to parameterize it in a pgffor-loop, and I wouldn't worry too much about optimization for such a small data-set. Do you intent to use a larger data set? Can you please share a bit of your motivation to optimize? @samcarter_is_at_topanswers.xyz's mention of overlay sounds interesting.
Jan 22 at 15:16 comment added samcarter_is_at_topanswers.xyz Personally I'd use a tikz matrix to place the nodes next to each other and the overlay-beamer-styles tikz library to highlight different nodes on different overlays. This way you would only need one copy of the code. (if you need the result in another class, you could then include it as image)
Jan 22 at 15:13 comment added samcarter_is_at_topanswers.xyz Instead of changing the order in which you draw them, you could use layers to put elements in the foreground.
Jan 22 at 15:11 history asked Emanuele Nardi CC BY-SA 4.0