Changeset 641d00
- Timestamp:
- 03/02/11 17:19:16 (2 years ago)
- Branches:
- master, python3
- Children:
- ceabe6
- Parents:
- 011d7b
- git-author:
- Tiago de Paula Peixoto <tiago@…> (03/02/11 17:19:16)
- git-committer:
- Tiago de Paula Peixoto <tiago@…> (03/02/11 17:19:16)
- Location:
- src/graph_tool
- Files:
-
- 13 edited
-
centrality/__init__.py (modified) (1 diff)
-
clustering/__init__.py (modified) (2 diffs)
-
community/__init__.py (modified) (1 diff)
-
correlations/__init__.py (modified) (1 diff)
-
draw/__init__.py (modified) (1 diff)
-
flow/__init__.py (modified) (1 diff)
-
generation/__init__.py (modified) (1 diff)
-
run_action/inline.py (modified) (6 diffs)
-
search/__init__.py (modified) (6 diffs)
-
spectral/__init__.py (modified) (1 diff)
-
stats/__init__.py (modified) (1 diff)
-
topology/__init__.py (modified) (1 diff)
-
util/__init__.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/graph_tool/centrality/__init__.py
r011d7b r641d00 44 44 dl_import("import libgraph_tool_centrality") 45 45 46 from .. coreimport _prop, ungroup_vector_property46 from .. import _prop, ungroup_vector_property 47 47 import sys 48 48 import numpy -
src/graph_tool/clustering/__init__.py
r011d7b r641d00 45 45 dl_import("import libgraph_tool_clustering as _gt") 46 46 47 from .. coreimport _degree, _prop, Graph47 from .. import _degree, _prop, Graph 48 48 from .. topology import isomorphism 49 49 from .. generation import random_rewire … … 464 464 shuffle_strategy : string (optional, default: "uncorrelated") 465 465 Shuffle strategy to use. Can be either "correlated" or "uncorrelated". 466 See random_rewire()for details.466 See :func:`~graph_tool.generation.random_rewire` for details. 467 467 468 468 Returns -
src/graph_tool/community/__init__.py
r011d7b r641d00 43 43 dl_import("import libgraph_tool_community") 44 44 45 from .. coreimport _degree, _prop, Graph, libcore45 from .. import _degree, _prop, Graph, libcore 46 46 import random 47 47 import sys -
src/graph_tool/correlations/__init__.py
r011d7b r641d00 44 44 dl_import("import libgraph_tool_correlations") 45 45 46 from .. coreimport _degree, _prop46 from .. import _degree, _prop 47 47 from numpy import * 48 48 -
src/graph_tool/draw/__init__.py
r011d7b r641d00 38 38 39 39 import sys, os, os.path, time, warnings, tempfile 40 from .. coreimport _degree, _prop, PropertyMap, _check_prop_vector,\40 from .. import _degree, _prop, PropertyMap, _check_prop_vector,\ 41 41 _check_prop_scalar, _check_prop_writable, group_vector_property,\ 42 42 ungroup_vector_property -
src/graph_tool/flow/__init__.py
r011d7b r641d00 74 74 dl_import("import libgraph_tool_flow") 75 75 76 from .. coreimport _prop, _check_prop_scalar, _check_prop_writable76 from .. import _prop, _check_prop_scalar, _check_prop_writable 77 77 __all__ = ["edmonds_karp_max_flow", "push_relabel_max_flow", 78 78 "boykov_kolmogorov_max_flow", "max_cardinality_matching"] -
src/graph_tool/generation/__init__.py
r011d7b r641d00 46 46 dl_import("import libgraph_tool_generation") 47 47 48 from .. coreimport Graph, _check_prop_scalar, _prop, _limit_args48 from .. import Graph, _check_prop_scalar, _prop, _limit_args 49 49 from .. stats import label_parallel_edges, label_self_loops 50 50 import sys, numpy, numpy.random -
src/graph_tool/run_action/inline.py
r011d7b r641d00 19 19 20 20 import sys, string, hashlib, os.path, re, glob 21 from .. import core21 from .. import * 22 22 from .. import libgraph_tool_core 23 23 import numpy … … 67 67 68 68 for d in ["vertex", "edge", "graph"]: 69 for t in core.value_types():69 for t in value_types(): 70 70 props += "typedef %s_prop_t::as<%s >::type %sprop_%s_t;\n" % \ 71 71 (d, t.replace("bool", "uint8_t"), d[0], clean_prop_type(t)) … … 159 159 else: 160 160 arg_val = global_dict[arg] 161 if issubclass(type(arg_val), core.Graph):161 if issubclass(type(arg_val), Graph): 162 162 alias = "__gt__" + arg 163 163 gi = "__gt__" + arg + "__gi" … … 171 171 arg_alias.append(alias) 172 172 alias_dict[alias] = gi_val 173 elif type(arg_val) == core.PropertyMap:173 elif type(arg_val) == PropertyMap: 174 174 alias = "__gt__" + arg 175 175 if arg_val == arg_val.get_graph().vertex_index: … … 223 223 arg_val = global_dict[arg] 224 224 if arg not in mask_ret and \ 225 type(arg_val) not in [numpy.ndarray, core.PropertyMap] and \226 not issubclass(type(arg_val), core.Graph):225 type(arg_val) not in [numpy.ndarray, PropertyMap] and \ 226 not issubclass(type(arg_val), Graph): 227 227 return_vals += 'return_vals["%s"] = %s;\n' % (arg, arg) 228 228 … … 242 242 extra_objects + \ 243 243 extra_link_args) + \ 244 headers_hash + core.__version__).hexdigest()244 headers_hash + __version__).hexdigest() 245 245 code += "\n// support code hash: " + support_hash 246 246 inline_code = string.Template(globals()["code_template"]).\ -
src/graph_tool/search/__init__.py
r011d7b r641d00 79 79 dl_import("import libgraph_tool_search") 80 80 81 from .. coreimport _prop81 from .. import _prop 82 82 from .. decorators import _wraps 83 83 import sys … … 192 192 ["initialize_vertex"]) 193 193 def bfs_search(g, source, visitor=BFSVisitor()): 194 r"""This function performs a breadth-first traversal of the vertices in a 195 directed or undirected graph. 194 r"""Breadth-first traversal of a directed or undirected graph. 196 195 197 196 Parameters … … 402 401 "start_vertex"], ["initialize_vertex"]) 403 402 def dfs_search(g, source, visitor=DFSVisitor()): 404 r"""This function performs a depth-first traversal of the vertices in a 405 directed or undirected graph. 403 r"""Depth-first traversal of a directed or undirected graph. 406 404 407 405 Parameters … … 632 630 pred_map=None, combine=lambda a, b: a + b, 633 631 compare=lambda a, b: a < b, zero=0, infinity=float('inf')): 634 r""" This function performs a Dijsktra traversal of the vertices ina directed or undirected graph, with non-negative weights.632 r"""Dijsktra traversal of a directed or undirected graph, with non-negative weights. 635 633 636 634 Parameters … … 899 897 compare=lambda a, b: a < b, zero=0, 900 898 infinity=float('inf')): 901 r""" This function performs a Bellman-Ford traversal of the vertices ina directed or undirected graph, with negative weights.899 r"""Bellman-Ford traversal of a directed or undirected graph, with negative weights. 902 900 903 901 Parameters … … 1172 1170 infinity=float('inf'), implicit=False): 1173 1171 r""" 1174 This algorithm implements a heuristic :math:`A^*` search on a weighted, directed or undirected graph for the case where all edge weights are non-negative.1172 Heuristic :math:`A^*` search on a weighted, directed or undirected graph for the case where all edge weights are non-negative. 1175 1173 1176 1174 Parameters -
src/graph_tool/spectral/__init__.py
r011d7b r641d00 37 37 """ 38 38 39 from .. coreimport _degree, _prop, Graph, _limit_args39 from .. import _degree, _prop, Graph, _limit_args 40 40 from numpy import * 41 41 import scipy.sparse -
src/graph_tool/stats/__init__.py
r011d7b r641d00 48 48 dl_import("import libgraph_tool_stats") 49 49 50 from .. coreimport _degree, _prop50 from .. import _degree, _prop 51 51 from numpy import * 52 52 import numpy -
src/graph_tool/topology/__init__.py
r011d7b r641d00 50 50 dl_import("import libgraph_tool_topology") 51 51 52 from .. coreimport _prop, Vector_int32_t, _check_prop_writable, \52 from .. import _prop, Vector_int32_t, _check_prop_writable, \ 53 53 _check_prop_scalar, _check_prop_vector, Graph, PropertyMap 54 54 import random, sys, numpy, weakref -
src/graph_tool/util/__init__.py
r011d7b r641d00 42 42 dl_import("import libgraph_tool_util") 43 43 44 from .. coreimport _degree, _prop44 from .. import _degree, _prop 45 45 import weakref 46 46
Note: See TracChangeset
for help on using the changeset viewer.


