public override void Init(List <byte> arg) // from interfaces { const int bias = 0; //S-Block record type: 'some args, Line1, Line2, ..., LineN'. No some args => Bias=0. if (arg.Count >= bias) { if (arg.Count - bias != 0) { VarCount = (int)Math.Log(arg.Count - bias, 2); // Matrix: 2**n x n } if (VarCount == this._length) { FuncMatrix = WayConverter.ListToMatrix(arg.Skip(bias).ToList(), VarCount); //Line0: y0..yn //Line1: y0..yn //.................... //Line2**n-1: y0..yn if (_database == null) { _database = new SBlockDB(); } var Note = _database.GetNoteFromDB(FuncMatrix); CorMatrix = Note.CorMatrix; DifMatrix = Note.DifMatrix; LStates = Note.LStates; DStates = Note.DStates; } else { throw new Exception("Argument length error"); } } }
public DBNote GetNoteFromDB(List <byte> funcMatrix, int VarCount) { return(GetNoteFromDB(WayConverter.ListToMatrix(funcMatrix, VarCount))); }