/** * При инициализации нужно только предать таблицу затрат * @param array or BranchAndBound $table * @param Node $prev */ function __construct($table, Node $prev = null) { $this->id = Sequence::getID(); if (is_array($table)) { self::$messages->open(1); $this->branchnBound = new BranchAndBound($table); $this->addMyselfToMins(); self::$messages->close(); $this->handleNode(); } else { $this->branchnBound = $table; if ($this->branchnBound->solvable) { $this->addMyselfToMins(); } $this->prev = $prev; } }