10/5/2023 0 Comments Directed graph builder![]() igraph_full - Creates a full graph (directed or undirected, with or without loops). igraph_regular_tree - Creates a regular tree. igraph_symmetric_tree - Creates a symmetric tree with the specified number of branches at each level. igraph_kary_tree - Creates a k-ary tree in which almost all vertices have k children. igraph_ring - Creates a cycle graph or a path graph. igraph_hexagonal_lattice - A hexagonal lattice with the given shape. igraph_triangular_lattice - A triangular lattice with the given shape. ![]() igraph_square_lattice - Arbitrary dimensional square lattices. igraph_wheel - Creates a wheel graph, a union of a star and a cycle graph. igraph_star - Creates a star graph, every vertex connects only to the center. igraph_adjlist - Creates a graph from an adjacency list. igraph_sparse_weighted_adjacency - Creates a graph from a weighted sparse adjacency matrix. igraph_sparse_adjacency - Creates a graph from a sparse adjacency matrix. igraph_weighted_adjacency - Creates a graph from a weighted adjacency matrix. igraph_adjacency - Creates a graph from an adjacency matrix. igraph_small - Shorthand to create a small graph, giving the edges as arguments. igraph_create - Creates a graph with the specified edges. You should have received a copy of the GNU General Public License along with This file. See the GNU General Public License for more details. This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. This file is free software you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation either version 3, or (at your option) any later version. (etc) A033996 max vertex degree in a D dimensional gridĪ006076,A103315 count of ways domination number attained SEE ALSO House of Graphs entries for graphs here includeġ340 4x4 cyclic or 2x2x2x2 cyclic, tesseractĪ few of the entries in Sloane's Online Encyclopedia of Integer Sequences related to these graphs include For higher dimensions the degree increases. In a cyclic grid all vertices are this degree. FORMULAS Vertex Degreeįor a 2-dimensional grid each vertex is degree up to 8 if the grid is big enough (each dimension >= 5). Option undirected => 1 creates an undirected graph and for it there is a single edge between vertices. Like Graph::Maker::Grid, if the graph is directed (the default) then edges are added both forward and backward between vertices. Other parameters are passed to the constructor, either graph_maker or Graph->new(). Graph_maker => subr(key=>value) constructor, default Graph->newĭims and cyclic are in the style of Graph::Maker::Grid. ![]() The key/value parameters are dims => arrayref of dimensions (That class also has a self-loop for 1-dimension dims => whereas here that is no edges as described above.) FUNCTIONS $graph = Graph::Maker->new('knight_grid', key => value. This is the same as the 1-vertex cyclic case in Graph::Maker::Grid. 2 dimensions like dims => can be given and in that case the effect with cyclic is steps +/-1 and +/-2 along the row of vertices cycling at the ends.įor a 1x1 cyclic grid dims =>, or any higher 1x1x1 etc, there is a self-loop edge since the knight move wraps around from the single vertex to itself. When there is only 1 dimension there is no second dimension for the second step. A knight move 2,1 means move 2 in one dimension and 1 in another. For 2 dimensions this is knight moves on a torus.įor 1 dimension like dims => there are no edges. CyclicĬyclic => 1 makes the grid wrap-around at its sides. +-+-+-+-+ dims => įor 3 or more dimensions the moves are step by 2 in some coordinate and 1 in another different coordinate. ![]() The dims and cyclic parameters are the same as Graph::Maker::Grid but the edges here are steps 2,1. Graph::Maker::KnightGrid creates a Graph.pm graph for a grid of squares with edges connecting squares as a chess knight moves. $graph = Graph::Maker->new ('knight_grid', dims => ) DESCRIPTION Graph::Maker::KnightGrid - create Knight grid graph SYNOPSIS use Graph::Maker::KnightGrid
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |