|
Brief summary, please correct me if I'm wrong. A ZigZag structure is an undirected graph. Nodes are arranged in an n-dimensional space. For each coordinate axis, every node can only have one edge in the plus-1-along-coordinate direction, and one edge in the minus-1-along-the-coordinate. I.e. no diagonal connections, and max one connection in each "cardinal direction" (+ and - in n dimensions = 2n directions). In its simplest form, a ZigZag structure can be an n-dimensional grid, where each node is connected to its direct neighbors in the grid. In 2D, that would give you a spreadsheet. However, ZigZag can do more: you can have loops along any axis, e.g. a spreadsheet where the columns "wrap around". Furthermore, ZigZag supports looping the columns of only one particular row: a normal 2D spreadsheet, except that row 13 only has 4 columns, and those columns are wrapped up in a loop. You could also have sparse grids - where nodes are missing, and the edges skip over the missing node. The idea is to have something that locally, if you look only at the surrounding nodes, always looks like a neat n-dimensional grid. But the global topology can be totally whacky. I have no idea what you would use such a thing for. |
Presenting graph-structured data in a way that the graph has sufficient restrictions on it to be representable usefully in a UI.
In some sense all data structures are just restrictions on graph data structures. So why not just use graphs directly more often? Because the full freedom of graphs can result in a lot of situations that are pathological for both algorithms and UIs, such as graphs that mostly have one node connected to one node, except suddenly there's a node with 1,000,000 connections, which raises obvious UI issues.
To the extent this is not used today, it's probably because in the end it's still too general and has been outcompeted by all the other UI widgets we have that take more advantage of all the menagerie of local structures we have identified. It turns out that we are generally willing to do the work to create specialized representations for those things. We do lose some generality, but, again, we seem willing to do the work to specialize, so it all mostly works out. Only a very few people are out there working with data with so little such specialized support that they are reduced to working with raw graphs directly, and they already mostly have no choice but to learn to deal with the graphs directly and would be as frustrated trying to jam them into this structure as they would any other structure that restricts graphs.