igraph_lattice() supports square grid graphs of any dimension and their "circular" counterparts where the coordinates "wrap around". Hex grids or triangular lattices are not supported directly - you need to come up with the edge list of these lattices -- basically you create an igraph_vector_t, fill it with the edge list and then call igraph_create() to create the graph. T.
On Mon, Jul 25, 2016 at 8:28 PM, Marisel Di Pietro MartÃnez <[email protected]> wrote: > A question from: http://stackoverflow.com/q/38572057/5556571?sem=2 > > I'm trying to build a lattice[1] using igraph C. In the manual > instructions[2] it says that igraph.lattice() can creat most kinds of > lattices and here[3] it explains how to use that function but it seems > like the only lattice I can create with that function is a square one, > like a square grid... But how do I create a triangular lattice or any > kind of lattice? > > Thanks in advance! > > [1] https://upload.wikimedia.org/wikipedia/commons/thumb/e/ee/2d-bravai > s.svg/1024px-2d-bravais.svg.png > [2] http://igraph.org/c/doc/igraph-Generators.html#igraph_lattice > [3] http://cneurocvs.rmki.kfki.hu/igraphbook/igraphbook-structures.html > #id2534549 > > _______________________________________________ > igraph-help mailing list > [email protected] > https://lists.nongnu.org/mailman/listinfo/igraph-help _______________________________________________ igraph-help mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/igraph-help
