| Summary | Package variables | Synopsis | Description | General documentation | Methods |
| Summary | Top |
| Clair::Network::Centrality - Abstract class for computing network centrality |
| Package variables | Top |
| No package variables defined. |
| Included modules | Top |
| Carp |
| Synopsis | Top |
| Clair::Network::Centrality should not be called directly, but instead inherited from a concrete Centrality subclass. |
| Description | Top |
| This object is a base class for computing vertex centrality. |
| Methods | Top |
| centrality | Description | Code |
| new | No description | Code |
| node_centrality | Description | Code |
| normalized_centrality | Description | Code |
| save | Description | Code |
| centrality | code | next | Top |
| Compute centrality for every vertex. Subclasses must implement the _centrality method, and return a hash with vertices as the keys and centrality measures as the values. |
| node_centrality | code | prev | next | Top |
| Compute centrality for a single vertex. Subclasses must implement the _centrality method, and return a single value indicating the node's centrality. |
| normalized_centrality | code | prev | next | Top |
| Compute centrality for every vertex, normalized to a value betwen 0 and 1. Subclasses must implement the _normalized_centrality method, and return a hash with vertices as the keys and normalized centrality measures as the values. |
| save | code | prev | next | Top |
| Save centrality values to a file Subclasses must implement the save method, which takes one argument: the filename to save |
| centrality | description | prev | next | Top |
sub centrality
{my $self = shift; return $self->_centrality(@_);} |
| new | description | prev | next | Top |
sub new
{ my $class = shift;
my $net = shift;
my $self = {};
$self->{net} = $net;
bless($self, $class);
return $self;} |
| node_centrality | description | prev | next | Top |
sub node_centrality
{my $self = shift; my $node = shift; return $self->_node_centrality($node, @_);} |
| normalized_centrality | description | prev | next | Top |
sub normalized_centrality
{my $self = shift; return $self->_normalized_centrality(@_);} |
| save | description | prev | next | Top |
sub save
{die "Centrality subclasses must implement save method\n";} |