Algorithm-SocialNetwork

 view release on metacpan or  search on metacpan

lib/Algorithm/SocialNetwork.pod  view on Meta::CPAN


=head1 METHODS

So far this module implement the algorithm provided in [1].
More handy algorithm would be included in the future.

This module is a L<Spiffy> module, methods provided
as "field" are marked.

=over 2

=item new([graph => $G])

Object constructor, an optional graph parameter could
be passed in to specify the network graph to be analyzed.

=item graph([$G]) [Spiffy field]

Without arguments, this method return the current
L<Graph> object.

=item BetweenessCentrality([$vertex])

The implementation of algorithm provided in [1], if an optional
parameter $vertex is given, return the BetwenessCentrality value of
that vertex, otherwise, return all vertice's BetweenessCentrality
value, stored in a hash, which hash node name as keys.

=item ClusteringCoefficient($vertex)

Return the clustering coefficient of a given vertex.

=item WeightedClusteringCoefficient($vertex)

Return the weighted clustering coefficient of a given vertex. The
graph object passed in should have 'weight' attribute set on
edges. Weights are default to 1 if it's not set.

=item DistanceCentrality($vertex)

Return the distance centrality of a given vertex.

=item ClosenessCentrality($vertex)

An alias of DistanceCentrality().

=item GraphCentrality($vertex)

Return the graph centrality of a given vertex.

=item edges(@vertices)

Return a list of edges that connets any two of @vertices.

=back

=head1 SEE ALSO

[1] Ulrik Brandes,
A Faster Algorithm for Betweenness Centrality,
http://www.inf.uni-konstanz.de/algo/publications/b-fabc-01.pdf

L<Spiffy>,L<Graph>

=head1 COPYRIGHT

Copyright 2004 by Kang-min Liu <gugod@gugod.org>.

This program is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.

See <http://www.perl.com/perl/misc/Artistic.html>

=cut



( run in 0.837 second using v1.01-cache-2.11-cpan-39bf76dae61 )