开发者

How can I implement QT (quality threshold) clustering in Perl?

I am having troub开发者_如何学Cle with a QT clustering implementation that I want to implement in Perl.

How can I implement QT (quality threshold) clustering in Perl?

The line beginning with "identify set", the third from the end, is the part I can't figure out.

The full paper is available here.


A sub i is a cluster. {A sub 1, A sub 2, ..., A sub |G|} is a cluster of clusters.

Identify set C in {A sub 1, A sub 2, ..., A sub |G|} with maximum cardinality means finding the largest cluster A sub i.

In perl, if the cluster of clusters is:

my @bigun = (
                [1, 2, 3],
                [4, 5, 6, 7],
                [8]
            );

then

# @C = @{ $bigun[1] };

use List::Util qw/reduce/;
my @C = @{ reduce { @$a > @$b ? $a : $b } @bigun };
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜