/** * Constructs a SetAsArray 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] = false; } }
/** * Constructs a SetAsBitVector 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->vector = new BasicArray(intval(($n + Limits::INTBITS - 1) / Limits::INTBITS)); for ($i = 0; $i < $this->vector->getLength(); ++$i) { $this->vector[$i] = 0; } }
/** * Constructs a PartitionTree * for the specified element of the universal set * a the specified Partition. * * @param object PartitionAsForest $partition The partition. * @param integer $item An element of the universal set. */ public function __construct(PartitionAsForest $partition, $item) { parent::__construct($partition->getUniverseSize()); $this->partition = $partition; $this->item = $item; $this->parent = NULL; $this->rank = 0; $this->count = 1; }
/** * Constructs an AbstractPartition with the given universe size. * * @param integer $universeSize The size of the universal set. */ public function __construct($universeSize) { parent::__construct($universeSize); }
public function __construct() { parent::__construct(); }
/** * Constructs a Set object of the specified type, * optionally with the specified data * * @param string $setType * @param array $data */ public function __construct($setType, array $data = []) { $this->setType = $setType; parent::__construct($data); }
public function __construct(IComparator &$comparator = null) { parent::__construct(); $this->_comparator = $comparator; }