File tree Expand file tree Collapse file tree 1 file changed +0
-37
lines changed Expand file tree Collapse file tree 1 file changed +0
-37
lines changed Original file line number Diff line number Diff line change @@ -624,43 +624,6 @@ private function ratioReduce($sum, $triple)
624
624
return $ sum + ($ triple [count ($ triple ) - 1 ]);
625
625
}
626
626
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
-
664
627
/**
665
628
* Helper function for calculating the ratio to measure similarity for the strings.
666
629
* The ratio is defined as being 2 * (number of matches / total length)
You can’t perform that action at this time.
0 commit comments