Configure tests to be performed automatically
[nasm.git] / perllib / Graph / SPTHeapElem.pm
blob045553107e72639c15e0e1b9a17891175661af90
1 package Graph::SPTHeapElem;
3 use strict;
4 use vars qw($VERSION @ISA);
5 use Heap071::Elem;
7 use base 'Heap071::Elem';
9 $VERSION = 0.01;
11 sub new {
12 my $class = shift;
13 bless { u => $_[0], v => $_[1], w => $_[2] }, $class;
16 sub cmp {
17 ($_[0]->{ w } || 0) <=> ($_[1]->{ w } || 0) ||
18 ($_[0]->{ u } cmp $_[1]->{ u }) ||
19 ($_[0]->{ u } cmp $_[1]->{ v });
22 sub val {
23 @{ $_[0] }{ qw(u v w) };