Commit c65210b4 by Tiago Peixoto

### Properly parse some degree arguments, which can also be properies

parent d5356666
 ... @@ -620,7 +620,7 @@ class Graph(object): ... @@ -620,7 +620,7 @@ class Graph(object): @_limit_args({"strategy":["correlated", "uncorrelated"]}) @_limit_args({"strategy":["correlated", "uncorrelated"]}) def random_rewire(self, strategy="uncorrelated", parallel_edges=False, def random_rewire(self, strategy="uncorrelated", parallel_edges=False, self_loops=False, seed=int(time.time())): self_loops=False, seed=int(time.time())): """Randomly rewire the edges of the graph""" """Randomly rewire the edges of the graph""" self.__graph.RandomRewire(strategy, self_loops, parallel_edges, seed) self.__graph.RandomRewire(strategy, self_loops, parallel_edges, seed) # Basic graph statistics # Basic graph statistics ... @@ -782,8 +782,8 @@ class Graph(object): ... @@ -782,8 +782,8 @@ class Graph(object): def average_combined_vertex_correlation(self, degree1, degree2): def average_combined_vertex_correlation(self, degree1, degree2): """Get the average of degree2 in function of degree1. Scalar properties """Get the average of degree2 in function of degree1. Scalar properties are also accepted as degree1 or degree2""" are also accepted as degree1 or degree2""" return self.__graph.GetAverageCombinedVertexCorrelation(degree1, f = self.__graph.GetAverageCombinedVertexCorrelation degree2) return f(_degree(degree1), _degree(degree2)) @_attrs(opt_group=__groups[-1], has_output=True) @_attrs(opt_group=__groups[-1], has_output=True) @_handle_exceptions @_handle_exceptions ... @@ -794,8 +794,8 @@ class Graph(object): ... @@ -794,8 +794,8 @@ class Graph(object): passed by weight""" passed by weight""" if weight == None: if weight == None: weight = "" weight = "" self.__graph.GetVertexCorrelationHistogram(origin_degree, f = self.__graph.GetVertexCorrelationHistogram neighbour_degree, weight) return f(_degree(origin_degree), _degree(neighbour_degree), weight) @_attrs(opt_group=__groups[-1], has_output=True) @_attrs(opt_group=__groups[-1], has_output=True) @_handle_exceptions @_handle_exceptions ... ...
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!