Esempio n. 1
0
 /**
  * {@inheritdoc}
  */
 public function getIterator() : Traversable
 {
     return $this->tree->keys();
 }
Esempio n. 2
0
 /**
  * @expectedException \Novuso\System\Exception\LookupException
  */
 public function test_that_select_throws_exception_when_rank_out_of_bounds()
 {
     $tree = new RedBlackSearchTree(new ComparableComparator());
     $tree->select(10);
 }
Esempio n. 3
0
 /**
  * {@inheritdoc}
  */
 public function select(int $rank)
 {
     return $this->tree->select($rank);
 }