The method is automatically chosen depending on input:
method will use the weight 1 for every edge:
can be used for graphs with positive edge weights only:
can be used for directed graphs including negative edge weights:
can be used for directed graphs including negative edge weights:
can be faster than the method on sparse graphs: