/** * 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 7.\n"); $status = 0; SetAsArray::main($args); SetAsBitVector::main($args); MultisetAsArray::main($args); MultisetAsLinkedList::main($args); PartitionAsForest::main($args); return $status; }
throw new MethodNotImplemented(); } /** * Compares this partition with the specified comparable object. * This method is not implemented. * * @param object IComparable $obj * The object with which this partition is compared. */ protected function compareTo(IComparable $arg) { throw new MethodNotImplemented(); } /** * Main program. * * @param array $args Command-line arguments. * @return integer Zero on success; non-zero on failure. */ public static function main($args) { printf("PartitionAsForest main program.\n"); $status = 0; $p = new PartitionAsForest(5); AbstractPartition::test($p); return $status; } } if (realpath($argv[0]) == realpath(__FILE__)) { exit(PartitionAsForest::main(array_slice($argv, 1))); }