Skip to content

Commit b3b089c

Browse files
committed
This function has never been used
1 parent f1d7fdc commit b3b089c

File tree

1 file changed

+0
-37
lines changed

1 file changed

+0
-37
lines changed

lib/Diff/SequenceMatcher.php

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -624,43 +624,6 @@ private function ratioReduce($sum, $triple)
624624
return $sum + ($triple[count($triple) - 1]);
625625
}
626626

627-
/**
628-
* Quickly return an upper bound ratio for the similarity of the strings.
629-
* This is quicker to compute than Ratio().
630-
*
631-
* @return float The calculated ratio.
632-
*/
633-
private function quickRatio()
634-
{
635-
if($this->fullBCount === null) {
636-
$this->fullBCount = array();
637-
$bLength = count ($this->b);
638-
for($i = 0; $i < $bLength; ++$i) {
639-
$char = $this->b[$i];
640-
$this->fullBCount[$char] = $this->arrayGetDefault($this->fullBCount, $char, 0) + 1;
641-
}
642-
}
643-
644-
$avail = array();
645-
$matches = 0;
646-
$aLength = count ($this->a);
647-
for($i = 0; $i < $aLength; ++$i) {
648-
$char = $this->a[$i];
649-
if(isset($avail[$char])) {
650-
$numb = $avail[$char];
651-
}
652-
else {
653-
$numb = $this->arrayGetDefault($this->fullBCount, $char, 0);
654-
}
655-
$avail[$char] = $numb - 1;
656-
if($numb > 0) {
657-
++$matches;
658-
}
659-
}
660-
661-
$this->calculateRatio($matches, count ($this->a) + count ($this->b));
662-
}
663-
664627
/**
665628
* Helper function for calculating the ratio to measure similarity for the strings.
666629
* The ratio is defined as being 2 * (number of matches / total length)

0 commit comments

Comments
 (0)