File: Undirected.pm

package info (click to toggle)
libgraph-perl 1%3A0.96-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,316 kB
  • ctags: 938
  • sloc: perl: 6,094; sh: 8; makefile: 2
file content (49 lines) | stat: -rw-r--r-- 748 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
package Graph::Undirected;

use Graph;
use base 'Graph';
use strict;

=pod

=head1 NAME

Graph::Undirected - undirected graphs

=head1 SYNOPSIS

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

    # Or alternatively:

    use Graph;
    my $g = Graph->new(undirected => 1);
    my $g = Graph->new(directed => 0);

=head1 DESCRIPTION

Graph::Undirected allows you to create undirected graphs.

For the available methods, see L<Graph>.

=head1 SEE ALSO

L<Graph>, L<Graph::Directed>

=head1 AUTHOR AND COPYRIGHT

Jarkko Hietaniemi F<jhi@iki.fi>

=head1 LICENSE

This module is licensed under the same terms as Perl itself.

=cut

sub new {
    my $class = shift;
    bless Graph->new(undirected => 1, @_), ref $class || $class;
}

1;