repo.or.cz
/
nasm
/
avx512.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Version 0.99.03
[nasm/avx512.git]
/
perllib
/
Graph
/
MSTHeapElem.pm
blob
32bc00116605147f39fd79722603c6c51c3d4e22
1
package
Graph
::
MSTHeapElem
;
2
3
use
strict
;
4
use
vars
qw(
$VERSION
@ISA
);
5
use Heap071::Elem;
6
7
use base 'Heap071::Elem';
8
9
$VERSION
= 0.01;
10
11
sub new {
12
my
$class
= shift;
13
bless { u =>
$_
[0], v =>
$_
[1], w =>
$_
[2] },
$class
;
14
}
15
16
sub cmp {
17
(
$_
[0]->{ w } || 0) <=> (
$_
[1]->{ w } || 0);
18
}
19
20
sub val {
21
@{
$_
[0] }{ qw(u v w)
};
22
}
23
24
1
;