コード例 #1
0
 protected static int[] GetMod11Weights(StringNumber k)
 {
     var weights = new int[k.GetLength() - 1];
     for (int i = 0; i < weights.Length; i++)
     {
         int j = i%BaseMod11Weights.Length;
         weights[i] = BaseMod11Weights[j];
     }
     return weights;
 }
コード例 #2
0
        protected static int[] GetMod11Weights(StringNumber k)
        {
            var weights = new int[k.GetLength() - 1];

            for (int i = 0; i < weights.Length; i++)
            {
                int j = i % BaseMod11Weights.Length;
                weights[i] = BaseMod11Weights[j];
            }
            return(weights);
        }
コード例 #3
0
 protected static int[] GetMod10Weights(StringNumber k)
 {
     var weights = new int[k.GetLength() - 1];
     for (int i = 0; i < weights.Length; i++)
     {
         if ((i%2) == 0)
             weights[i] = 2;
         else
             weights[i] = 1;
     }
     return weights;
 }
コード例 #4
0
        protected static int[] GetMod10Weights(StringNumber k)
        {
            var weights = new int[k.GetLength() - 1];

            for (int i = 0; i < weights.Length; i++)
            {
                if ((i % 2) == 0)
                {
                    weights[i] = 2;
                }
                else
                {
                    weights[i] = 1;
                }
            }
            return(weights);
        }