natix.CompactDS.InvIndexSketchBuilder.InvIndexSketchBuilder C# (CSharp) Method

InvIndexSketchBuilder() public method

public InvIndexSketchBuilder ( IList _invindex, int len ) : System
_invindex IList
len int
return System
        public InvIndexSketchBuilder(IList<IList<int>> _invindex, int len)
        {
            this.invindex = _invindex;
            this.len = len;
            var numbits = (int)Math.Ceiling(Math.Log (this.len, 2));
            this.msd_block = (int)Math.Ceiling(numbits / 1.5);
            this.lsd_block  = numbits - this.msd_block;
            int alphabet_size = this.invindex.Count;
            this.pos = new int[alphabet_size];
            this.cmp_pos = delegate(int x, int y) {
                x = this.invindex[x][pos[x]];
                y = this.invindex[y][pos[y]];
                return x.CompareTo (y);
            };
            this.pqueue_array = new PQueueSL<int>[1 << msd_block];
            int num_blocks = 1 << msd_block;
            for (int i = 0; i < num_blocks; i++) {
                //this.pqueue_array[i] = new PQueueSL<int> (invindex.Count, this.cmp_pos);
                this.pqueue_array[i] = new PQueueSL<int> (this.cmp_pos);
            }
        }