MCPcopy Create free account
hub / github.com/comaps/comaps / SuffixEqualsPrefix

Function SuffixEqualsPrefix

tools/openlr/helpers.cpp:205–210  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

203}
204
205bool SuffixEqualsPrefix(Graph::EdgeVector const & a, Graph::EdgeVector const & b, size_t len)
206{
207 CHECK_LESS_OR_EQUAL(len, a.size(), ());
208 CHECK_LESS_OR_EQUAL(len, b.size(), ());
209 return equal(a.end() - len, a.end(), b.begin());
210}
211
212// Returns a length of the longest suffix of |a| that matches any prefix of |b|.
213// Neither |a| nor |b| can contain several repetitions of any edge.

Callers 1

PathOverlappingLenFunction · 0.85

Calls 3

sizeMethod · 0.45
endMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected