public GaoDecoder(FiniteField Fq, FFE[] alphas, int k) { this.Fq = Fq; this.alphas = alphas; this.n = alphas.Length; this.k = k; }
public static FFE[] GetDefautLocation(FiniteField Fq, int n) { if (n > Fq.q) { throw new ArgumentException("More locations than field elements is not allowed. You must ensure n <= q."); } FFE[] alphas = new FFE[n]; if (n < Fq.q) { for (int i = 0; i < n; i++) { alphas[i] = Fq[i + 1]; } } else // n == q { for (int i = 0; i < n; i++) { alphas[i] = Fq[i]; } } return(alphas); }