line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Algorithm::RankAggregate::AverageRank; |
2
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
4774
|
use strict; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
115
|
|
4
|
3
|
|
|
3
|
|
15
|
use warnings; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
154
|
|
5
|
|
|
|
|
|
|
our $VERSION = '0.0.3_00'; |
6
|
|
|
|
|
|
|
|
7
|
3
|
|
|
3
|
|
15
|
use base qw/Algorithm::RankAggregate::AverageRating/; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
2016
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub aggregate_rank_to_rank { |
10
|
7
|
|
|
7
|
1
|
27
|
my ($this, $ranked_lists_list) = @_; |
11
|
7
|
|
|
|
|
13
|
my @result = (); |
12
|
7
|
50
|
|
|
|
14
|
my $bordacount_result_list = $this->aggregate_rank_to_rating($ranked_lists_list) if (@{$ranked_lists_list}); |
|
7
|
|
|
|
|
60
|
|
13
|
7
|
50
|
|
|
|
30
|
@result = @{$this->get_reverse_ranked_list($bordacount_result_list)} if (@{$bordacount_result_list}); |
|
7
|
|
|
|
|
38
|
|
|
7
|
|
|
|
|
22
|
|
14
|
7
|
|
|
|
|
26
|
return \@result; |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub aggregate_score_to_rank { |
18
|
5
|
|
|
5
|
1
|
16
|
my ($this, $score_lists_list) = @_; |
19
|
5
|
|
|
|
|
10
|
my @result = (); |
20
|
5
|
|
|
|
|
26
|
my $ranked_lists_list = $this->get_ranked_lists_list($score_lists_list); |
21
|
5
|
50
|
|
|
|
8
|
@result = @{$this->aggregate_rank_to_rank($ranked_lists_list)} if (@{$ranked_lists_list}); |
|
5
|
|
|
|
|
40
|
|
|
5
|
|
|
|
|
26
|
|
22
|
5
|
|
|
|
|
20
|
return \@result; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub aggregate { |
26
|
3
|
|
|
3
|
1
|
15
|
my ($this, $score_lists_list) = @_; |
27
|
3
|
|
|
|
|
5
|
my @result = (); |
28
|
3
|
50
|
|
|
|
16
|
return \@result unless ($this->validate_lists_list($score_lists_list)); |
29
|
3
|
50
|
|
|
|
4
|
@result = @{$this->aggregate_score_to_rank($score_lists_list)} if (@{$score_lists_list}); |
|
3
|
|
|
|
|
10
|
|
|
3
|
|
|
|
|
9
|
|
30
|
3
|
|
|
|
|
8
|
return \@result; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
1; |
34
|
|
|
|
|
|
|
__END__ |