Skip to content

connected-components should return a seq of (sub)graphs #122

@skrat

Description

@skrat

A component is a subgraph, whereas the connected-components returns vector of vectors without any connectivity data. It also does not preserve order even in simple cases such as this one:

(alg/connected-components
 (graph/graph {\a #{\b}
               \b #{\c}
               \c #{\d}
               \d #{\a}}))

=> [[\a \b \d \c]]

I'm not sure how is this function useful.

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