| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
1
|
|
|
1
|
|
6
|
use strict; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
42
|
|
|
2
|
1
|
|
|
1
|
|
7
|
use warnings; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
55
|
|
|
3
|
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
package Medical::OPCS4::Graph; |
|
5
|
|
|
|
|
|
|
# ABSTRACT: A directed graph class. |
|
6
|
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
1073
|
use Graph::Directed; |
|
|
1
|
|
|
|
|
138345
|
|
|
|
1
|
|
|
|
|
102
|
|
|
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
|
|
|
|
|
|
|
sub new { |
|
25
|
1
|
|
|
1
|
1
|
18
|
my $self = Graph::Directed->new(); |
|
26
|
1
|
|
|
|
|
323
|
$self->add_vertex( 'root' ); |
|
27
|
1
|
|
|
|
|
59
|
$self->set_vertex_attribute('root', 'description', 'This is the root node.' ); |
|
28
|
|
|
|
|
|
|
|
|
29
|
1
|
|
|
|
|
229
|
return $self; |
|
30
|
|
|
|
|
|
|
} |
|
31
|
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
1; |