Пример #1
0
        /// <summary>
        /// Compare this vector with another object
        /// </summary>
        ///
        /// <param name="Obj">The object for comparison</param>
        ///
        /// <returns>The result of the comparison</returns>
        public override bool Equals(Object Obj)
        {
            if (!(Obj is GF2mVector))
            {
                return(false);
            }

            GF2mVector otherVec = (GF2mVector)Obj;

            if (!_field.Equals(otherVec.Field))
            {
                return(false);
            }

            return(Compare.AreEqual(IntArrayForm, otherVec.IntArrayForm));
        }
Пример #2
0
 /// <summary>
 /// The copy constructor
 /// </summary>
 /// 
 /// <param name="GF">The GF2mVector to copy</param>
 public GF2mVector(GF2mVector GF)
 {
     _field = new GF2mField(GF._field);
     Length = GF.Length;
     _vector = IntUtils.DeepCopy(GF._vector);
 }
Пример #3
0
 /// <summary>
 /// Create a polynomial over the finite field GF(2^m) out of the given coefficient vector
 /// <para>The finite field is also obtained from the GF2mVector</para>
 /// </summary>
 ///
 /// <param name="Vect"></param>
 public PolynomialGF2mSmallM(GF2mVector Vect) :
     this(Vect.Field, Vect.IntArrayForm)
 {
 }
 /// <summary>
 /// Create a polynomial over the finite field GF(2^m) out of the given coefficient vector
 /// <para>The finite field is also obtained from the GF2mVector</para>
 /// </summary>
 /// 
 /// <param name="Vect"></param>
 public PolynomialGF2mSmallM(GF2mVector Vect)
     : this(Vect.Field, Vect.IntArrayForm)
 {
 }
Пример #5
0
 /// <summary>
 /// The copy constructor
 /// </summary>
 ///
 /// <param name="GF">The GF2mVector to copy</param>
 public GF2mVector(GF2mVector GF)
 {
     _field  = new GF2mField(GF._field);
     Length  = GF.Length;
     _vector = IntUtils.DeepCopy(GF._vector);
 }