| 1 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 2 | 1 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | |||
| 4 | package Medical::OPCS4::Graph; | ||
| 5 | # ABSTRACT: A directed graph class. | ||
| 6 | |||
| 7 | 1 | ▶ | use Graph::Directed; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | |||
| 9 | =head1 NAME | ||
| 10 | |||
| 11 | Medical::OPCS4::Graph - OPCS4 Graph object | ||
| 12 | |||
| 13 | =head1 METHODS | ||
| 14 | |||
| 15 | =head2 new | ||
| 16 | |||
| 17 | Creates a new graph object with a single edge, the root. | ||
| 18 | |||
| 19 | Do not use this module directly, this is for the sole purpose | ||
| 20 | of manipulating the internal graph that stores the ontology. | ||
| 21 | |||
| 22 | =cut | ||
| 23 | |||
| 24 | 1 | ▶ | sub new { |
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
documented
| |||
| 25 | 1 | my $self = Graph::Directed->new(); | |
| 26 | 1 | $self->add_vertex( 'root' ); | |
| 27 | 1 | $self->set_vertex_attribute('root', 'description', 'This is the root node.' ); | |
| 28 | |||
| 29 | 1 | return $self; | |
| 30 | } | ||
| 31 | |||
| 32 | 1 | 1; | |