/** * 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; }
/** * Compares this set with the specified comparable object. * This method is not implemented. * * @param object IComparable $arg * The comparable object to compare with this set. */ 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("SetAsBitVector main program.\n"); $status = 0; $s1 = new SetAsBitVector(57); $s2 = new SetAsBitVector(57); $s3 = new SetAsBitVector(57); AbstractSet::test($s1, $s2, $s3); return $status; } } if (realpath($argv[0]) == realpath(__FILE__)) { exit(SetAsBitVector::main(array_slice($argv, 1))); }