Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose internal rust interface to DenseLayout #12104

Merged
merged 4 commits into from
May 22, 2024

Commits on Mar 29, 2024

  1. Expose internal rust interface to DenseLayout

    This commit makes a small change to the rust code for DenseLayout that
    enables calling it more easily from rust. The primary obstacle was the
    pyfunction used PyReadonlyArray2<f64> inputs which precludes calling it
    with rust constructed Array2Views<f64>. This adds a new inner public
    function which takes the array view directly and then the pyfunction's
    only job is to convert the inputs and outputs to Python. The python side
    of the function is still building a sparse matrix and then runs reverse
    Cuthill–McKee to get a permutation of the densest subgraph so any rust
    consumers will want to keep that in mind (and maybe use sprs to do the
    same).
    
    At the same time it corrects an oversight in the original implementation
    where the returned numpy arrays of the densest subgraph are copied
    instead of being returned as references. This should slightly improve
    performance by eliminating 3 array copies that weren't needed.
    mtreinish committed Mar 29, 2024
    Configuration menu
    Copy the full SHA
    f48af01 View commit details
    Browse the repository at this point in the history

Commits on May 22, 2024

  1. Configuration menu
    Copy the full SHA
    42f8585 View commit details
    Browse the repository at this point in the history
  2. Remove PyResult

    mtreinish committed May 22, 2024
    Configuration menu
    Copy the full SHA
    33493a0 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3d86114 View commit details
    Browse the repository at this point in the history