-
Notifications
You must be signed in to change notification settings - Fork 4
EditDist
Stewart Thomson edited this page May 10, 2018
·
1 revision
int EditDist(Matrix<double> trajectory1, Matrix<double> trajectory2, double pointDistance = 20)
Calculates the edit distance between two trajectories
Matrix<double> trajectory1 | The first trajectory
Matrix<double> trajectory2 | The second trajectory
The two trajectories must have the same dimensions, but can have a different number of points
int pointDistance | A number representing the max distance in each dimension allowed for points to be equivalent
double[,] arr1 = {{0,1,2,3},{0,1,2,3}};
path1 = Matrix.Build.DenseOfColumns(arr1);
double[,] arr2 = {{0,1,2,3},{4,5,6,7}};
path2 = Matrix.Build.DenseOfColumns(arr2);
int editDistance = EditDist(path1, path2);