Applying an edit distance to the matching of tree ring sequences in dendrochronology