Version 0.99.03
[nasm/avx512.git] / perllib / Graph / MSTHeapElem.pm
blob32bc00116605147f39fd79722603c6c51c3d4e22
1 package Graph::MSTHeapElem;
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);
20 sub val {
21 @{ $_[0] }{ qw(u v w) };