Graph::Undirected::Hamiltonicity::Spoof - spoof undirected graphs.
use Graph::Undirected::Hamiltonicity::Spoof qw(&spoof_known_hamiltonian_graph); my $v = 30; my $e = 50; my $g = spoof_known_hamiltonian_graph($v,$e); ### $g is an instance of Graph::Undirected ### $g is a random Hamiltonian graph with $v vertices and $e edges.
No symbols are exported by default.
To load all the subroutines of this package:
use Graph::Undirected::Hamiltonicity::Spoof qw(:all);
The subroutines that can be imported individually, by name, are:
spoof_canonical_hamiltonian_graph()
spoof_known_hamiltonian_graph()
spoof_random_graph()
spoof_randomish_graph()
Takes: $v, the number of vertices desired.
Returns: a Graph::Undirected with $v vertices, and $v edges. This graph is not random, but the canonical, ( regular-polygon-shaped ) Hamiltonian Cycle.
Spoof a randomized Hamiltonian graph with the specified number of vertices and edges.
Takes: $v, the number of vertices desired. $e, the number of edges desired. ( optional )
Returns: a Graph::Undirected with $v vertices, and $e edges. This graph is random, and Hamiltonian.
Ashwin Dixit, <ashwin at ownlifeful dot com>
<ashwin at ownlifeful dot com>
To install Graph::Undirected::Hamiltonicity, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Graph::Undirected::Hamiltonicity
CPAN shell
perl -MCPAN -e shell install Graph::Undirected::Hamiltonicity
For more information on module installation, please visit the detailed CPAN module installation guide.