Exemplo n.º 1
0
        public override bool Equals(object obj)
        {
            VectorBase <TScalar, TVector, TInvert> rhs = obj as VectorBase <TScalar, TVector, TInvert>;

            if (rhs == null)
            {
                return(false);
            }

            for (int i = 0; i < this.Size; i++)
            {
                if (!this.Operations.Compare(this[i], rhs[i]))
                {
                    return(false);
                }
            }

            return(true);
        }
Exemplo n.º 2
0
 public TScalar Dot(VectorBase <TScalar, TInvert, TVector> vector)
 {
     return(VectorUtilities.ScalarProduct(i => this[i], i => vector[i], this.Size, this.Operations));
 }