File: 13_chorded_cycle.t

package info (click to toggle)
libgraph-nauty-perl 0.5.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 160 kB
  • sloc: perl: 202; makefile: 3
file content (22 lines) | stat: -rw-r--r-- 462 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
use strict;
use warnings;
use Graph::Nauty qw(
    are_isomorphic
    automorphism_group_size
    orbits
);
use Graph::Undirected;
use Test::More tests => 1;

# Graph taken from "Refinement: equitable partition" section from:
# https://pallini.di.uniroma1.it/Introduction.html

my $g = Graph::Undirected->new;

$g->add_cycle( 1..8 );
$g->add_edge( 1, 7 );
$g->add_edge( 2, 6 );
$g->add_edge( 3, 5 );
$g->add_edge( 4, 8 );

is scalar orbits( $g, sub { '' } ), 3;