NAME
Graph::Maker::EvenOddTree - create star-like graphs
SYNOPSIS
use Graph::Maker::EvenOddTree;
$graph = Graph::Maker->new ('evenodd_tree', N => 3);
DESCRIPTION
Graph::Maker::EvenOddTree creates Graph.pm even/odd tree graphs. An even/odd tree has, across a row, 2 children under an even position vertex and 1 child under an odd position vertex. Positions across a row are reckoned starting from 0 so the first is even.
1,0
| \---------\
2,0 2,1 N => 4 rows
| \----\ |
3,0 3,1 3,2
| \ | | \
4,0 4,1 4,2 4,4 4,5
Tree N=5 is isomorphic to Graph::Maker::FibonacciTree. But in general even/odd is not the same as Fibonacci. Both are 1 or 2 children, but here this goes by row position whereas Fibonacci is sibling position (second has 1 child).
FUNCTIONS
$graph = Graph::Maker->new('evenodd_tree', key => value, ...)-
The key/value parameters are
N => integer, number of rows graph_maker => subr(key=>value) constructor, default Graph->newOther parameters are passed to the constructor, either
graph_makerorGraph->new().If the graph is directed (the default) then edges are added in both directions. Option
undirected => 1creates an undirected graph and for it there is a single edge each.
HOUSE OF GRAPHS
House of Graphs entries for graphs here include
https://hog.grinvin.org/ViewGraphInfo.action?id=1310 etc
1310 N=1, singleton
32234 N=2, path-3
288 N=3
21059 N=5
SEE ALSO
HOME PAGE
http://user42.tuxfamily.org/graph-maker-other/index.html
LICENSE
Copyright 2018, 2019, 2020, 2021 Kevin Ryde
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.
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. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with This file. If not, see http://www.gnu.org/licenses/.