C# Class TemporalNetworks.BetweennessPref

This class provides static methods to compute both betweenness preference matrices as well as betweenness preference of nodes in temporal networks
Mostra file Open project: IngoScholtes/TemporalNetworks Class Usage Examples

Public Methods

Method Description
GetBetweennessPref ( TemporalNetwork temp_net, string x, bool normalized = false ) : double

Computes the (scalar) betwenness preference of a node

GetBetweennessPref ( WeightedNetwork aggregate_net, string x, double P, bool normalized = false ) : double

Computes the scalar betwenness preference of a node based on its normalized betweenness preference matrix

GetBetweennessPrefDist ( TemporalNetwork temp_net ) : IEnumerable

Parallely computes the betweenness preference distribution of all nodes in a temporal network

GetBetweennessPrefMatrix ( TemporalNetwork temp_net, string x, int>.Dictionary &index_pred, int>.Dictionary &index_succ, bool normalized = true ) : ].double[

Computes the betweenness preference matrix of a node based on the set of two-paths of a node. By this we essentially implement equations (1) and (2). If additionally the normalization parameter is set, equation (3) will be computed.

GetUncorrelatedBetweennessPrefMatrix ( TemporalNetwork temp_net, string x, int>.Dictionary &index_pred, int>.Dictionary &index_succ ) : ].double[

Computes the baseline betweenness preference matrix of a node under the assumption that the temporal network does not contain a betweenness preference correlation. This corresponds to equation (5) in the paper.

GetUncorrelatedBetweennessPrefMatrix ( WeightedNetwork aggregate_net, string v, int>.Dictionary &index_pred, int>.Dictionary &index_succ ) : ].double[

Computes the baseline betweenness preference matrix of a node under the assumption that the temporal network does not contain a betweenness preference correlation. This corresponds to equation (5) in the paper.

NormalizeMatrix ( string x, WeightedNetwork aggregate_net, double B ) : ].double[

Computes a normalized version P of a given betweenness preference matrix B.

Private Methods

Method Description
Entropy ( double marginal_s ) : double

Method Details

GetBetweennessPref() public static method

Computes the (scalar) betwenness preference of a node
public static GetBetweennessPref ( TemporalNetwork temp_net, string x, bool normalized = false ) : double
temp_net TemporalNetwork The temporal network for which to compute betweenness preference
x string The node for which to compute betweenness preference
normalized bool
return double

GetBetweennessPref() public static method

Computes the scalar betwenness preference of a node based on its normalized betweenness preference matrix
public static GetBetweennessPref ( WeightedNetwork aggregate_net, string x, double P, bool normalized = false ) : double
aggregate_net WeightedNetwork The temporal network for which to compute betweenness preference
x string The node for which to compute betweenness preference
P double The betweenness preference matrix based on which betw. pref. will be computed
normalized bool
return double

GetBetweennessPrefDist() public static method

Parallely computes the betweenness preference distribution of all nodes in a temporal network
public static GetBetweennessPrefDist ( TemporalNetwork temp_net ) : IEnumerable
temp_net TemporalNetwork The temporal network to analyze
return IEnumerable

GetBetweennessPrefMatrix() public static method

Computes the betweenness preference matrix of a node based on the set of two-paths of a node. By this we essentially implement equations (1) and (2). If additionally the normalization parameter is set, equation (3) will be computed.
public static GetBetweennessPrefMatrix ( TemporalNetwork temp_net, string x, int>.Dictionary &index_pred, int>.Dictionary &index_succ, bool normalized = true ) : ].double[
temp_net TemporalNetwork The temporal network to compute betweeness preference for
x string The node for which to compute the betweenness preference matrix
index_pred int>.Dictionary A mapping of nodes to columns in the betweenness preference matrix
index_succ int>.Dictionary A mapping of nodes to rows in the betweenness preference matrix
normalized bool
return ].double[

GetUncorrelatedBetweennessPrefMatrix() public static method

Computes the baseline betweenness preference matrix of a node under the assumption that the temporal network does not contain a betweenness preference correlation. This corresponds to equation (5) in the paper.
public static GetUncorrelatedBetweennessPrefMatrix ( TemporalNetwork temp_net, string x, int>.Dictionary &index_pred, int>.Dictionary &index_succ ) : ].double[
temp_net TemporalNetwork The temporal network for which to compute the matrix
x string The node to compute the baseline betweenness preference for
index_pred int>.Dictionary Indices of predecessor nodes in the betweenness preference matrix
index_succ int>.Dictionary Indices of successor nodes in the betweenness preference matric
return ].double[

GetUncorrelatedBetweennessPrefMatrix() public static method

Computes the baseline betweenness preference matrix of a node under the assumption that the temporal network does not contain a betweenness preference correlation. This corresponds to equation (5) in the paper.
public static GetUncorrelatedBetweennessPrefMatrix ( WeightedNetwork aggregate_net, string v, int>.Dictionary &index_pred, int>.Dictionary &index_succ ) : ].double[
aggregate_net WeightedNetwork The weighted, aggregate ego network of node x based on which the matrix will be computed
v string The node to compute the baseline betweenness preference for
index_pred int>.Dictionary Indices of predecessor nodes in the betweenness preference matrix
index_succ int>.Dictionary Indices of successor nodes in the betweenness preference matric
return ].double[

NormalizeMatrix() public static method

Computes a normalized version P of a given betweenness preference matrix B.
public static NormalizeMatrix ( string x, WeightedNetwork aggregate_net, double B ) : ].double[
x string The node for which the normalized matrix is computed
aggregate_net WeightedNetwork The weighted aggregate network
B double The betweenness preference matrix that shall be normalized
return ].double[