Thanks to visit codestin.com
Credit goes to github.com

Skip to content

How should I deal with disconnected DAGs? #26

@codesoap

Description

@codesoap

This is not necessarily a feature request, but I'm curious how you would deal with disconnected DAGs, or if this is outside the scope of this library. Currently the library does not enforce the graph to be connected, so I can have multiple disconnected DAGs within one DAG of the library. In this case some functions like DAG.GetRoots become less useful and there seems to be no way to find the roots of a specific vertex.

Do you think something like a func (d *DAG) GetConnectedDAGs() []*DAG or func (d *DAG) GetConnectedDAG(id string) *DAG or func (d *DAG) DeleteDisconnected(id string) or similar would be a good addition to the library?

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