コード例 #1
0
ファイル: RSStream.cs プロジェクト: radtek/BackO
 public GaoDecoder(FiniteField Fq, FFE[] alphas, int k)
 {
     this.Fq     = Fq;
     this.alphas = alphas;
     this.n      = alphas.Length;
     this.k      = k;
 }
コード例 #2
0
ファイル: RSStream.cs プロジェクト: radtek/BackO
 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);
 }