private SuffixArray(int[] suffixArray, int[] lcpArray) { Contract.Assert(suffixArray.Length == lcpArray.Length + 1); Length = suffixArray.Length; SA = suffixArray; LcpArray = lcpArray; Rank = new int[suffixArray.Length]; for (int i = 0; i < suffixArray.Length; i++) { Rank[suffixArray[i]] = i; } var h = LcpArray; if (h.Length == 0) { h = new int[1]; } rmq = new SparseTable <int, MinOp>(h); }
public DebugView(SparseTable <TValue, TOp> st) { this.st = st; }