public static SequenceInvertedIndex Build(InvertedIndex invindex, SequenceBuilder builder) { var newinvindex = new SequenceInvertedIndex (); var xseq = new int[invindex.NumberOfItems]; for (int sym = 0; sym < invindex.Count; ++sym) { var list = invindex [sym]; foreach (var objID in list) { xseq [objID] = sym; } } newinvindex.seq = builder.Invoke (xseq, invindex.Count); return newinvindex; }