diff options
author | Vlad Yaroslavlev <vladon@vladon.com> | 2022-02-10 16:46:25 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:25 +0300 |
commit | 344ea37b4a345701ab0e67de2266a1c1bd7baf2d (patch) | |
tree | 1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /library/cpp/lcs | |
parent | 706b83ed7de5a473436620367af31fc0ceecde07 (diff) | |
download | ydb-344ea37b4a345701ab0e67de2266a1c1bd7baf2d.tar.gz |
Restoring authorship annotation for Vlad Yaroslavlev <vladon@vladon.com>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/lcs')
-rw-r--r-- | library/cpp/lcs/lcs_via_lis.h | 8 | ||||
-rw-r--r-- | library/cpp/lcs/lcs_via_lis_ut.cpp | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/library/cpp/lcs/lcs_via_lis.h b/library/cpp/lcs/lcs_via_lis.h index c652c31c81..d26733d94e 100644 --- a/library/cpp/lcs/lcs_via_lis.h +++ b/library/cpp/lcs/lcs_via_lis.h @@ -11,9 +11,9 @@ namespace NLCS { template <typename TVal> struct TLCSCtx { - typedef TVector<ui32> TSubsequence; - typedef THashMap<TVal, TSubsequence, THash<TVal>, TEqualTo<TVal>, ::TPoolAllocator> TEncounterIndex; - typedef TVector<std::pair<ui32, ui32>> TLastIndex; + typedef TVector<ui32> TSubsequence; + typedef THashMap<TVal, TSubsequence, THash<TVal>, TEqualTo<TVal>, ::TPoolAllocator> TEncounterIndex; + typedef TVector<std::pair<ui32, ui32>> TLastIndex; typedef NPagedVector::TPagedVector<TSubsequence, 4096> TCover; TMemoryPool Pool; @@ -183,7 +183,7 @@ namespace NLCS { template <typename TVal, typename TIter> size_t MeasureLCS(TIter beg1, TIter end1, TIter beg2, TIter end2, TLCSCtx<TVal>* ctx = nullptr) { - return MakeLCS<TVal>(beg1, end1, beg2, end2, (TVector<TVal>*)nullptr, ctx); + return MakeLCS<TVal>(beg1, end1, beg2, end2, (TVector<TVal>*)nullptr, ctx); } template <typename TVal, typename TColl> diff --git a/library/cpp/lcs/lcs_via_lis_ut.cpp b/library/cpp/lcs/lcs_via_lis_ut.cpp index 88c6bb4d94..f6ad5152b6 100644 --- a/library/cpp/lcs/lcs_via_lis_ut.cpp +++ b/library/cpp/lcs/lcs_via_lis_ut.cpp @@ -10,7 +10,7 @@ class TLCSTest: public TTestBase { private: size_t Length(TStringBuf s1, TStringBuf s2) { - TVector<TVector<size_t>> c; + TVector<TVector<size_t>> c; c.resize(s1.size() + 1); for (size_t i = 0; i < c.size(); ++i) { @@ -37,7 +37,7 @@ private: } void CheckLCSString(TStringBuf s1, TStringBuf s2, TStringBuf reflcs) { - TString lcs; + TString lcs; size_t len = NLCS::MakeLCS<char>(s1, s2, &lcs); const char* comment = Sprintf("%s & %s = %s", s1.data(), s2.data(), reflcs.data()).c_str(); |