public int Rank(int symbol, int _pos)
{
if (_pos < 0) {
return 0;
}
if (symbol == 0) {
return (int)this.xl_bitmap.Rank1 (_pos);
}
long pos = symbol * ((long)this.Count);
var rank_a = this.xl_bitmap.Rank1 (pos + _pos);
var rank_b = this.xl_bitmap.Rank1 (pos - 1);
return (int)(rank_a - rank_b);
}