Erich Morisse > Statistics-SocialNetworks > Statistics::SocialNetworks

Download:
Statistics-SocialNetworks-0.03.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View/Report Bugs
Module Version: 0.03   Source  

NAME ^

Statistics::SocialNetworks - Perl extension for calculating network constraint and other network statistics.

SYNOPSIS ^

  use Statistics::SocialNetworks ':all';
 
  # create hash representing graph
  my %g;
  foreach $f ( qw( a b c ) ) {
    foreach $t ( qw( a b c ) ) {
      next if $f eq $t;
      $g{$f}{$t} = rand();
    }
  }

  # every time the network changes and before calculations
  # not needed if you are only creating the graph once
  flushCache();

  # print out Burt network constraint value for each node
  foreach $f ( keys %g ) {
    print "$f,", constraint(\%g,$f), "\n";
  }

  # print out Coleman-Theil disorder index for each node
  foreach $f ( keys %g ) {
    print "$f,", CTdi(\%g,$f), "\n";
  }

DESCRIPTION ^

Calculates Burt's network constraint value on nodes within a hash based network representation. An earlier version (not public) was based on Graph, but that was too slow for networks of size.

Methods

AUTHOR ^

Erich S. Morisse, <emorisse@cpan.org>

COPYRIGHT AND LICENSE ^

Copyright (C) 2009 by Erich Morisse

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.

syntax highlighting: