protected function boundaries()
{
if (!is_null($this->_boundaries)) {
return $this->_boundaries;
}
// we have defined the boundaries of two non-overlapping intervals,
// so sorting puts both the intervals and their boundaries in order
$this->_boundaries = [$this->node->getLeft(), $this->node->getRight(), $this->bound1(), $this->bound2()];
sort($this->_boundaries);
return $this->_boundaries;
}