Skip to content

Is maximum_adjacency_search broken? #297

Open
@sebrockm

Description

@sebrockm

There are several things wrong with maximum_adjacency_search:

  • The pseudo code on https://www.boost.org/doc/libs/1_79_0/libs/graph/doc/maximum_adjacency_search.html does not mention any weights. Yet, weights is a required parameter. It's unclear what it is doing.
  • In L127, there is a set defined, but it is never filled with any values. In L181 there is a loop iterating over this always empty set. This is dead code.
  • It looks like the assignments property map is a dead parameter. Looking at the implementation, in L131 we see the one and only put operation performed on it. It overrides all possibly provided user input and assigns every vertex to itself. That makes all following get operations obsolete (every get(assignments, x) is equivalent to just x).
  • L158 is a noop

Background:

This algorithm was introduced in 393c072. There, it was extracted from stoer_wagner_min_cut which caused #286.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions