Skip to content

Double-counting self edges #1

@Wainberg

Description

@Wainberg

At these lines:

        w[u] += weight
        w[v] += weight
        wtot += weight
        if u != v:
            wtot += weight

did you mean:

        w[u] += weight
        wtot += weight
        if u != v:
            w[v] += weight
            wtot += weight

Currently, self-edges are double-counted when calculating w, but only counted once when calculating wtot, which seems inconsistent.

Fabulous method, by the way!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions