Edit operations used by the Levenshtein distance. More...
#include <rapidfuzz_amalgamated.hpp>
Public Member Functions | |
Opcode () | |
Opcode (EditType type_, int64_t src_begin_, int64_t src_end_, int64_t dest_begin_, int64_t dest_end_) | |
Public Attributes | |
EditType | type |
int64_t | src_begin |
int64_t | src_end |
int64_t | dest_begin |
int64_t | dest_end |
Edit operations used by the Levenshtein distance.
This represents an edit operation of type type which is applied to the source string
None: s1[src_begin:src_end] == s1[dest_begin:dest_end] Replace: s1[i1:i2] should be replaced by s2[dest_begin:dest_end] Insert: s2[dest_begin:dest_end] should be inserted at s1[src_begin:src_begin]. Note that src_begin==src_end in this case. Delete: s1[src_begin:src_end] should be deleted. Note that dest_begin==dest_end in this case.
|
inline |
|
inline |
int64_t rapidfuzz::Opcode::dest_begin |
index into the destination string
int64_t rapidfuzz::Opcode::dest_end |
index into the destination string
int64_t rapidfuzz::Opcode::src_begin |
index into the source string
int64_t rapidfuzz::Opcode::src_end |
index into the source string
EditType rapidfuzz::Opcode::type |
type of the edit operation