Beispiel #1
0
 /**
  * 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 IComparble $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("MultisetAsLinkedList main program.\n");
        $status = 0;
        $s1 = new MultisetAsLinkedList(57);
        $s2 = new MultisetAsLinkedList(57);
        $s3 = new MultisetAsLinkedList(57);
        AbstractMultiset::test($s1, $s2, $s3);
        return $status;
    }
}
if (realpath($argv[0]) == realpath(__FILE__)) {
    exit(MultisetAsLinkedList::main(array_slice($argv, 1)));
}