commonMain.com.dshatz.fuzzykat.Ration.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fuzzyKat-jvm Show documentation
Show all versions of fuzzyKat-jvm Show documentation
Fuzzy search for Kotlin Multiplatform
The newest version!
package com.dshatz.fuzzykat
import com.dshatz.fuzzykat.diffutils.Applicable
/**
* Interface for the different ratios
*/
interface Ratio : Applicable {
/**
* Applies the ratio between the two strings
*
* @param s1 Input string
* @param s2 Input string
* @return Integer representing ratio of similarity
*/
override fun apply(s1: String, s2: String): Int
/**
* Applies the ratio between the two strings
*
* @param s1 Input string
* @param s2 Input string
* @param sp String processor to pre-process strings before calculating the ratio
* @return Integer representing ratio of similarity
*/
fun apply(s1: String, s2: String, sp: ToStringFunction): Int
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy