Skip to content

BUG: copy_tree and move_tree reverse source and destination nodes #499

Description

@tturocy

Overview

In the implementation of copy_tree and move_tree, the call to the underlying C++ function reverses the roles of the source and destination nodes.

Actions

This has been a bug since 16.2, so the fix for this should branch off of maint16_2 for eventual merging back into that branch.

  • Add appropriate tests to the test suite that catch this bug (they are missing!)
  • Fix the bug itself (straightforward correction in the final lines of copy_tree and move_tree, respectively)
  • Expand documentation of copy_tree in both the C++ and Cython to note the following:
    • It is valid for dest to be a descendant of src; in such a case the copying terminates when the original terminal node is reached.
    • Copied nodes are kept in the same information set as the originals.

Metadata

Metadata

Assignees

Labels

bugcythonItems which involve coding in CythonpythonItems which involve coding in PythontestsItems which involve the pygambit test suite

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions