public function getPredecessors() { return new Vertex_IteratorAggregate($this, $this->getIncidentEdges()); } /** * Returns the vertices in this graph * which are successors of this vertex. * * @return object IteratorAggregate * The vertices in this graph which are successors of this vertex. */ public function getSuccessors() { return new Vertex_IteratorAggregate($this, $this->getEmanatingEdges()); } /** * Main program. * * @param array $args Command-line arguments. * @return integer Zero on success; non-zero on failure. */ public static function main($args) { printf("Vertex main program.\n"); $status = 0; return $status; } } if (realpath($argv[0]) == realpath(__FILE__)) { exit(Vertex::main(array_slice($argv, 1))); }