easygraph.functions.structural_holes.maxBlock module#

easygraph.functions.structural_holes.maxBlock.maxBlock(G, k, f_set=None, delta=1, eps=0.5, c=1, flag_weight=False)[source]#

Structural hole spanners detection via maxBlock method.

Parameters:
  • G (easygraph.DiGraph) –

  • k (int) – top - k structural hole spanners.

  • f_set (dict, optional) – user vi shares his/her information on network G at a rate fi. default is a random [0,1) integer for each node

  • delta (float, optional (default: 1)) – a small value delta > 0.

  • eps (float, optional (default: 0.5)) – an error ratio eps with 0 < eps < 1.

  • c (int, optional (default: 1)) – Success probability 1-n^-c of maxBlock.

  • flag_weight (bool, optional (default: False)) – Denotes whether each edge has attribute ‘weight’

Returns:

S_list – The list of each top-k structural hole spanners.

Return type:

list

See also

maxBlockFast

Examples

# >>> maxBlock(G, 100)

References

easygraph.functions.structural_holes.maxBlock.maxBlockFast(G, k, f_set=None, L=None, flag_weight=False)[source]#

Structural hole spanners detection via maxBlockFast method.

Parameters:
  • G (easygraph.DiGraph) –

  • G

  • k (int) – top - k structural hole spanners.

  • f_set (dict, optional) – user vi shares his/her information on network G at a rate fi. default is a random [0,1) integer for each node

  • L (int, optional (default: log2n)) – Simulation time L for maxBlockFast.

  • flag_weight (bool, optional (default: False)) – Denotes whether each edge has attribute ‘weight’

See also

maxBlock

Examples

# >>> maxBlockFast(G, 100)

References