Commit e36cc722 authored by dirk.wintergruen's avatar dirk.wintergruen
Browse files

calctop calculates also edge attributes

parent 8b7840bb
...@@ -1522,27 +1522,30 @@ def calcTopsForYears( ...@@ -1522,27 +1522,30 @@ def calcTopsForYears(
max_len=20, max_len=20,
filter_node=None, filter_node=None,
with_value=True, with_value=True,
displayAttr="lastname", displayAttr="name",
progressBar=None, progressBar=None,
displayAttr2="name", displayAttr2=None,
deleteZero=True, deleteZero=True,
normalize=None, normalize=None,
mode ="vertex"
**kwargs **kwargs
): ):
""" """
Calculate for a year network the top vertices for each year with respect to the function func Calculate for a year network the top vertices for each year with respect to the function func
:param ynw: A dictionary y -> igraph :param ynw: A dictionary y -> igraph
:param func: A centrality function for a vertex ,defaults to "betweenness" :param func: A centrality function for a vertex ,defaults to "betweenness"
:param max_len: :param max_len:Maximal number of entries to be returned
:param filter_node: :param func: Centrality function for a vertex, defaults to betweenness, getattr(ng, func)(**kwargs) has to be implemented.
:param with_value: :param filter_node: Filter nodes by attribute values, expects a struct node attribute -> list of allowed values
:param displayAttr: :param mode: either "vertex" or "edge" defaults to "vertex"
:param progressBar: :param with_value: returns also the value of func for each node and vertices if set to true, defaults to true
:param displayAttr2: :param displayAttr: Node attribute to used to identify the node, defaults to "name"
:param deleteZero: :param displayAttr2: Additional attribute, defaults to None
:param normalize: :param deleteZero: Don't return entries with value 0, defaults to True
:param kwargs: :param normalize: Normalize the results, value can be None, mean or median, defaults to None
:param kwargs: kwargs to be passed to the centrality to function see above
:return: :return:
""" """
...@@ -1582,6 +1585,7 @@ def calcTopsForYears( ...@@ -1582,6 +1585,7 @@ def calcTopsForYears(
displayAttr2=displayAttr2, displayAttr2=displayAttr2,
deleteZero=deleteZero, deleteZero=deleteZero,
normalize=normalize, normalize=normalize,
mode=mode
**kwargs **kwargs
) )
...@@ -1596,6 +1600,7 @@ def calcTopsForYears( ...@@ -1596,6 +1600,7 @@ def calcTopsForYears(
displayAttr2=displayAttr2, displayAttr2=displayAttr2,
deleteZero=deleteZero, deleteZero=deleteZero,
normalize=normalize, normalize=normalize,
mode = mode
**kwargs **kwargs
) )
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment