Beispiel #1
0
 /**
  * create new Vertices instance
  *
  * You can pass in just about anything that can be expressed as a Set of
  * Vertices, such as:
  * - an array of Vertex instances
  * - any Algorithm that implements the VerticesAggregate interface
  * - a Graph instance or
  * - an existing Set of Vertices which will be returned as-is
  *
  * @param array|Vertices|VerticesAggregate $vertices
  * @return Vertices
  */
 public static function factory($vertices)
 {
     if ($vertices instanceof VerticesAggregate) {
         return $vertices->getVertices();
     }
     return new self($vertices);
 }