コード例 #1
0
ファイル: ChainedHashTable.php プロジェクト: wergimity/algo
 private function read($address)
 {
     step();
     $position = $address * $this->fullLength;
     step();
     return $this->storage->read($position, $this->fullLength);
 }
コード例 #2
0
ファイル: RedBlackSearchTree.php プロジェクト: wergimity/algo
 public function read($address)
 {
     step();
     if ($address === null) {
         step();
         return '';
     }
     step();
     $position = $address * $this->fullLength;
     step();
     $length = $this->fullLength;
     step();
     return $this->storage->read($position, $length);
 }