Clair::Network

Centrality


SummaryPackage variablesSynopsisDescriptionGeneral documentationMethods

SummaryTop
Clair::Network::Centrality - Abstract class for computing network centrality

Package variablesTop
No package variables defined.

Included modulesTop
Carp

SynopsisTop
Clair::Network::Centrality should not be called directly, but instead
inherited from a concrete Centrality subclass.

DescriptionTop
This object is a base class for computing vertex centrality.

MethodsTop
centralityDescriptionCode
newNo descriptionCode
node_centralityDescriptionCode
normalized_centralityDescriptionCode
saveDescriptionCode

Methods description


centralitycode    nextTop
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_centralitycodeprevnextTop
Compute centrality for a single vertex.
Subclasses must implement the _centrality method, and return a
single value indicating the node's centrality.

normalized_centralitycodeprevnextTop
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.

savecodeprevnextTop
Save centrality values to a file
Subclasses must implement the save method, which takes one argument:
the filename to save

Methods code


centralitydescriptionprevnextTop
sub centrality {
  my $self = shift;

  return $self->_centrality(@_);
}

newdescriptionprevnextTop
sub new {
  my $class = shift;
  my $net = shift;

  my $self = {};
  $self->{net} = $net;

  bless($self, $class);

  return $self;
}

node_centralitydescriptionprevnextTop
sub node_centrality {
  my $self = shift;
  my $node = shift;

  return $self->_node_centrality($node, @_);
}

normalized_centralitydescriptionprevnextTop
sub normalized_centrality {
  my $self = shift;

  return $self->_normalized_centrality(@_);
}

savedescriptionprevnextTop
sub save {
  die "Centrality subclasses must implement save method\n";
}

General documentation


No general documentation available.