示例#1
0
 /**
  * Constructs a MultisetAsArray for the specified size
  * of universal set.
  *
  * @param integer $n The number of elements in the universal set.
  */
 public function __construct($n = 0)
 {
     parent::__construct($n);
     $this->array = new BasicArray($n);
     for ($item = 0; $item < $this->universeSize; ++$item) {
         $this->array[$item] = 0;
     }
 }
 /**
  * Constructs a MultisetAsLinkedList for the specified size
  * of universal set.
  *
  * @param integer $n The number of elements in the universal set.
  */
 public function __construct($n = 0)
 {
     parent::__construct($n);
     $this->list = new LinkedList();
 }