• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Qiskit / retworkx / 829 / 3
97%
master: 97%

Build:
DEFAULT BRANCH: master
Ran 09 Sep 2020 07:36PM UTC
Files 8
Run time 2s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

09 Sep 2020 07:32PM UTC coverage: 92.429% (+0.3%) from 92.093%
829.3

push

travis-ci-com

web-flow
Add compose method for combining two graph objects (#66)

* Add compose method for combining two graph objects

This commit adds a compose() method to the PyDiGraph object and PyGraph
object. This method takes in another PyDiGraph or PyGraph object respectively
and a dictionary on where to add edges between the nodes. The keys are node
indicies in the first graph and the value is a tuple of the node indices in
the other graph and the weight to use for that edge.

This is a first implementation and is not that efficient since it
requires looping over the graph structure of the other graph to manually
reconstruct it in the original graph. Ideally in the future we should be
able to do this primarily as memory/vector operations and only adjusting
the graph structure on the boundaries. However, there is no support in
doing this via petgraph yet (see petgraph/petgraph#276) so for a first
pass this just iterates over the graph strucutre which should still be
significantly faster than doing it in python.

Related to #61

* Add edge_map_func kwarg and expand tests

* Apply suggestions from code review

Co-authored-by: Kevin Krsulich <kevin@krsulich.net>

* Add node_map_func to pair with edge_map_func

* Fix oversights for new kwarg

Co-authored-by: Kevin Krsulich <kevin@krsulich.net>
Co-authored-by: Kevin Krsulich <kevin.krsulich@ibm.com>

1868 of 2021 relevant lines covered (92.43%)

2321.72 hits per line

Source Files on job 829.3
  • Tree
  • List 0
  • Changed 3
  • Source Changed 2
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 356
  • Travis Job 829.3
  • abca7d70 on github
  • Prev Job for on master (#826.3)
  • Next Job for on master (#833.3)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc