public function join(ISet $p, ISet $q) { $this->checkArguments($p, $q); if ($p->getCount() > $q->getCount()) { $q->setParent($p); $p->setCount($p->getCount() + $q->getCount()); } else { $p->setParent($q); $q->setCount($p->getCount() + $q->getCount()); } --$this->count; } //}>b /** * Main program. * * @param array $args Command-line arguments. * @return integer Zero on success; non-zero on failure. */ public static function main($args) { printf("PartitionAsForestV2 main program.\n"); $status = 0; $p = new PartitionAsForestV2(5); AbstractPartition::test($p); return $status; } } if (realpath($argv[0]) == realpath(__FILE__)) { exit(PartitionAsForestV2::main(array_slice($argv, 1))); }