pub fn new(distance_algorithm: DistanceAlgorithm) -> EditDistance {
        let distance_comparator:Box<dyn Distance> = match distance_algorithm {
            DistanceAlgorithm::DamaerauOSA => Box::new(DamaerauOSA::new()),
            DistanceAlgorithm::Levenshtein => Box::new(Levenshtein::new()),
        };

        EditDistance {
            distance_comparator
        }
    }
/// <summary>Create a new EditDistance object.</summary>
/// <param name="algorithm">The desired edit distance algorithm.</param>
Create a new EditDistance object.
The desired edit distance algorithm.
Create a new EditDistance object . The desired edit distance algorithm .
pub fn new(distance_algorithm: DistanceAlgorithm) -> EditDistance {
        let distance_comparator:Box<dyn Distance> = match distance_algorithm {
            DistanceAlgorithm::DamaerauOSA => Box::new(DamaerauOSA::new()),
            DistanceAlgorithm::Levenshtein => Box::new(Levenshtein::new()),
        };
        EditDistance {
            distance_comparator
        }
    }
pub fn new ( distance_algorithm : DistanceAlgorithm ) -> EditDistance { let distance_comparator : Box < dyn Distance > = match distance_algorithm { DistanceAlgorithm :: DamaerauOSA => Box :: new ( DamaerauOSA :: new ( ) ) , DistanceAlgorithm :: Levenshtein => Box :: new ( Levenshtein :: new ( ) ) , } ; EditDistance { distance_comparator } }
<summary>Create a new EditDistance object.</summary>
<param name="algorithm">The desired edit distance algorithm.</param>
<summary > Create a new EditDistance object . < / summary > <param name = " algorithm " > The desired edit distance algorithm . < / param >
distance_algorithm
DistanceAlgorithm