/** * Main program. * * @param array $args Command-line arguments. * @return integer Zero on succes; non-zero on failure. */ public static function main($args) { printf("Demonstration program number 10.\n"); $status = 0; GraphAsMatrix::main($args); GraphAsLists::main($args); DigraphAsMatrix::main($args); DigraphAsLists::main($args); return $status; }
* Compares this graph with the specified comparable object. * This method is not implemented. * * @param object IComparable $arg * The object with which to compare this graph. */ protected function compareTo(IComparable $arg) { throw new MethodNotImplementedException(); } /** * Main program. * * @param array $args Command-line arguments. * @return integer Zero on success; non-zero on failure. */ public static function main($args) { printf("GraphAsMatrix main program.\n"); $status = 0; $g = new GraphAsMatrix(4); AbstractGraph::test($g); $g->purge(); AbstractGraph::testWeighted($g); $g->purge(); return $status; } } if (realpath($argv[0]) == realpath(__FILE__)) { exit(GraphAsMatrix::main(array_slice($argv, 1))); }