Skip to content

BUG in isForest #58

@089

Description

@089

Bitte fixen, falls noch Zeit und Lust:

Für graphtoolGui -iml "[0 1 1 1 1 0 0 0 0 0 0; 1 0 0 0 0 0 0 0 0 0 0; 1 0 0 0 0 0 0 0 0 0 0; 1 0 0 0 0 0 0 1 1 1 0; 1 0 0 0 0 1 1 0 0 0 0; 0 0 0 0 1 0 0 0 0 0 0; 0 0 0 0 1 0 0 0 0 0 0; 0 0 0 1 0 0 0 0 0 0 0; 0 0 0 1 0 0 0 0 0 0 0; 0 0 0 1 0 0 0 0 0 0 1; 0 0 0 0 0 0 0 0 0 1 0]" -na gibt die Function hasCycle() true statt false aus (siehe #57. Das führt dazu, dass auch deine Funktion nicht gut funktioniert.

Im Codeteil

    if(hasCycle() || !isDirected()) {
        isForestFlag = false;
        return false;
    }

bin ich mir nicht ganz sicher, ob !isDirected() an der Stelle richtig ist. Warum sollte ein ungerichteter Graph ohne weitere Überprüfung kein Wald sein (siehe Beispiel oben)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions