Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • graph-tool graph-tool
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 48
    • Issues 48
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

Please use the issue tracker only to report bugs (i.e. errors in the library that need to be fixed) or feature requests.

For questions about how to compile, install or use the library, please use instead the web forum at https://forum.skewed.de/c/graph-tool.


(If unsure, use the forum first.)


IMPORTANT: When opening new issues, please choose the BUG template from the drop-down menu, and fill out the required information.

  • Tiago Peixoto
  • graph-toolgraph-tool
  • Issues
  • #619
Closed
Open
Issue created Jan 01, 2020 by Jonathan Lewis@jonathanlewis

topology.all_predecessors()

I am a little confused by the documentation for topology.all_predecessors (v.2.29)

https://graph-tool.skewed.de/static/doc/topology.html#graph_tool.topology.all_predecessors

The Parameters section says that pred_map is optional

pred_mapVertexPropertyMap (optional, default: None)

However the title line in the documentation suggests that pred_map must be supplied:

graph_tool.topology.all_predecessors(g, dist_map, pred_map, weights=None, epsilon=1e-08)

And running the code without supplying pred_map throws an error.

from graph_tool import generation as gt_generation
from graph_tool import topology as gt_topology
g = gt_generation.price_network(500)
distance_map = gt_topology.shortest_distance(g)
all_pred_map = gt_topology.all_predecessors(g, distance_map)

TypeError: all_predecessors() missing 1 required positional argument: 'pred_map'

So my follow-up question is: how do I generate a pred_map to supply to all_predecessors()?

I am running 2.29 on Python 3.6.7 packaged by conda-forge, MacOS 10.15.2

Thanks

Jonathan

Assignee
Assign to
Time tracking