void Init(IndexingMethod im, int inp, int dinp) { if (inp <= 0 || dinp <= 0 || inp < dinp || inp > 31 || dinp > 31) { throw new Exception(string.Format("Wrong parameters: inp={0} dinp={1}", inp, dinp)); } this.im = im; this.inp = inp; this.dinp = dinp; }
// Constructor public Indexer(IndexingMethod method) { // Indexing method: BSBI or SPIMI this.method = method; }
public Indexer(IndexingMethod im, int inp, int dinp) { Init(im, inp, dinp); }