Heray-Was-Here
Server : Apache
System : Linux vps103298.mylogin.co 4.18.0-513.11.1.el8_9.x86_64 #1 SMP Wed Jan 17 02:00:40 EST 2024 x86_64
User : calvet ( 273824)
PHP Version : 7.4.33
Disable Function : NONE
Directory :  /proc/thread-self/root/proc/self/root/usr/share/perl5/vendor_perl/Graph/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/thread-self/root/proc/self/root/usr/share/perl5/vendor_perl/Graph/SPTHeapElem.pm
package Graph::SPTHeapElem;

use strict;
use vars qw($VERSION @ISA);
use Heap071::Elem;

use base 'Heap071::Elem';

sub new {
    my $class = shift;
    bless { u => $_[0], v => $_[1], w => $_[2] }, $class;
}

sub cmp {
    ($_[0]->{ w } || 0) <=> ($_[1]->{ w } || 0) ||
    ($_[0]->{ u } cmp $_[1]->{ u }) ||
    ($_[0]->{ u } cmp $_[1]->{ v });
}

sub val {
    @{ $_[0] }{ qw(u v w) };
}

1;

Hry