1. 21 Dec, 2007 2 commits
  2. 17 Dec, 2007 1 commit
    • Tiago Peixoto's avatar
      Fix visibility/RTTI problem with run_action() · 0c1f0df2
      Tiago Peixoto authored
      Some visibility voodoo is necessary to ensure that RTTI work properly
      across DSO boundaries, which is necessary to properly handle dynamic
      property maps and such. Additionally, the action template must have a
      different name each time the action code changes, to avoid additional
      This also adds some other utility functions/typedefs to make writing
      "inline" c++ code easier.
  3. 14 Dec, 2007 2 commits
    • Tiago Peixoto's avatar
      Fix add_edge_property() · 5b45d806
      Tiago Peixoto authored
      add_edge_property() should return a edge property not a vertex_property
    • Tiago Peixoto's avatar
      Add support for running arbitrary C++ code from python · 866bb994
      Tiago Peixoto authored
      It is now possible to run arbitrary "inline" C++ code from python, using
      scipy.weave, as such:
              g = graph_tool.Graph()
              value = 2.0
              g.run_action('cout << num_vertices(g) << " " << value << endl;',
      The code gets compiled the first time, and is reused after that. Python
      local and global variables can be passed to C++, as shown above, by
      specifying a list of passed variables as the second argument.
  4. 13 Dec, 2007 1 commit
  5. 06 Dec, 2007 2 commits
    • Tiago Peixoto's avatar
      Fix edit_{vertex|edge|graph}_property() · db440664
      Tiago Peixoto authored
      The graph object passed to the edit function is now a instance of the
      Graph class which wraps GraphInterface, not a GraphInterface instance.
    • Tiago Peixoto's avatar
      Implement lazy loading of graphs · de0a0a8e
      Tiago Peixoto authored
      Graphs can now be loaded "lazily" with the lazy_load() function, which
      works just like load(), but doesn't actually load the graph, which is
      delayed until the graph is accessed for the first time, e.g.
          import graph_tool
          g = graph_tool.Graph()
          g.number_of_vertices()  # <- the graph is only loaded here
  6. 03 Dec, 2007 6 commits
  7. 30 Nov, 2007 2 commits
    • Tiago Peixoto's avatar
      Merge branch 'rewiring' · d0cf197c
      Tiago Peixoto authored
      Improve formatting of src/graph/graph_rewiring.cc (line breaks at column
      80, typedefs, trailing whitespace removal, etc)
    • Tiago Peixoto's avatar
      Further improvements of the python interface · 1a0e9b5f
      Tiago Peixoto authored
      Property maps can now be obtained as such:
               weight = g.edge_properties['weight']
               print weight[v] # v is a Vertex object
               weight[v] = 2.0
               # and so on...
      The list of properties is obtained from g.vertex_properties,
      g.edge_properties and g.graph_properties, which can be read as
      dictionaries. The last can be set also, as such:
               g.graph_properties = {foo:"bar", baz:42}
      Functions to add and remove vertices or adges were also added
      (add_{vertex|edge}, remove_{vertex|edgge}).
      Vertex and Edge types can also now be printed for convenience, as such:
             for v in g.vertices():
                 print v
             for e in g.edges():
                 print e
      which results, for example, in:
      (this also adds the forgotten graph_tool.py file, which was previously
      on .gitignore)
  8. 28 Nov, 2007 1 commit
  9. 26 Nov, 2007 3 commits
  10. 20 Nov, 2007 1 commit
    • Tiago Peixoto's avatar
      Complete re-factoring of python module and command line tool · 8b32d7fc
      Tiago Peixoto authored
      The program was split in two parts:
          1. A python module, graph_tool.py, which encapsulates the graph
             manipulation under a Graph class. Now the following can be done:
                    import graph_tool
                    g1 = graph_tool.Graph()
                    g2 = graph_tool.Graph()
                    print g1.number_of_vertices(), g2.number_of_vertices()
          2. A standalone command line tool, graph-tool, which imports
             graph_tool.py, and exposes the Graph methods as command line
      The whole command line engine was thus (once again) entirely
      rewritten. It is now Crack-Free™, and simply mirrors the methods of the
      Graph class as command line options, using, for this, the beauty of
      function decorators. It classifies now, I believe, as Pythonic™.
  11. 11 Nov, 2007 1 commit
  12. 10 Nov, 2007 2 commits
  13. 05 Nov, 2007 1 commit
    • Ale Abdo's avatar
      Correlated random rewiring functional · 0b15235f
      Ale Abdo authored
      Several changes in the random rewiring code, making it fully
      functional for the correlated case.
      The reshuffling operations lag in efficiency, even though already
      the algorithm runs in little time.
  14. 04 Nov, 2007 4 commits
  15. 27 Oct, 2007 1 commit
  16. 24 Oct, 2007 7 commits
  17. 23 Oct, 2007 3 commits
    • Ale Abdo's avatar
      merging changes from old rewiring branch · e1e2f3c2
      Ale Abdo authored
      and now we have a good consistent branch where the removal of rewiring
      has been properly reverted before new work is added, so it can be
      easily merged with the master branch in the future.
    • Ale Abdo's avatar
      Revert "Remove graph rewiring" · ae2fe620
      Ale Abdo authored
      It's still buggy (of course), but now we'll try to fix it in it's own
      This reverts commit 1cdbdeef.
    • Tiago Peixoto's avatar
      Fix GetEdgeHistogram() for undirected graphs · 32ae550d
      Tiago Peixoto authored
      The Histogram type 'hist_t' should have a 'double' value, so that
      counts of 1/2 can be added when it's known things are going to be
      counted twice.
      (and I don't know what that 'double_t' thing was doing there)