Module runa::math

source · []
Expand description

The Math crate of the project

Structs

Traits

A structure meant to be passed as a generic parameter to other functions. it is meant to ensapsulate all the information related to

Functions

Align a letter with a word in the optimal way. O(n) time
Calculate the optimal cutting point in sequence y for the corresponding cutting point |x|/2 in sequence x
Calculate the cost of the alignment (x, y) passed as parameter
Compute distance using a 2D table O(n^2) time O(n^2) memory
Calculate the distance between two sequences O(n^2) time O(n) memory
Compute the 2D dynamic-programming table for the sequences x and y
Calculate distance between sequences x and y in the MetricSpace M O(exp(n)) time and memory
auxiliary function for dist_naif
Generate a word composed of gaps of length n
Calculate the optimal alignment and the distance between the sequences at once
Remove all gaps from the sequence
Compute the optimal alignment using a 2D table O(n^2) time and memory
Same as sol_1 but you pass in the table manually
Compute the alignement of two sequences in O(n^2) time and O((n+m)log n) memory
Auxiliary function for sol_2 O(n^2) time and O((n+m)log n) memory