public static function factoryFromEdges($edges, Vertex $startVertex)
    {
        $vertices = array($startVertex);
        $vertexCurrent = $startVertex;
        foreach ($edges as $edge) {
            $vertexCurrent = $edge->getVertexToFrom($vertexCurrent);
            $vertices []= $vertexCurrent;
        }

        return new self($vertices, $edges);
    }
public static function factoryFromEdges($edges, Vertex $startVertex)
    {
        $vertices = array($startVertex);
        $vertexCurrent = $startVertex;
        foreach ($edges as $edge) {
            $vertexCurrent = $edge->getVertexToFrom($vertexCurrent);
            $vertices []= $vertexCurrent;
        }

        return new self($vertices, $edges);
    }
public static function factoryFromEdges ( $ edges , Vertex $ startVertex ) { $ vertices = array ( $ startVertex ) ; $ vertexCurrent = $ startVertex ; foreach ( $ edges as $ edge ) { $ vertexCurrent = $ edge -> getVertexToFrom ( $ vertexCurrent ) ; $ vertices [ ] = $ vertexCurrent ; } return new self ( $ vertices , $ edges ) ; }
construct new walk from given start vertex and given array of edges

@param  Edges|Edge[]         $edges
@param  Vertex               $startVertex
@return Walk
construct new walk from given start vertex and given array of edges