///<summary> /// Subtract an argument from vector ///</summary> ///<exception cref="Exception">Throw exception if vector's lengthes are not equal</exception> public void SubtractTo(ReadOnlyVector arg) { CheckLengths(this, arg); for (int i = Count - 1; i >= 0; --i) { SetElem(i, Elem(i) - arg.Elem(i)); } }
///<summary> /// Multiply vector to argument componentwise ///</summary> ///<exception cref="Exception">Throw exception if vector's lengthes are not equal</exception> public void MultiplyComponentwiseTo(ReadOnlyVector arg) { CheckLengths(this, arg); for (int i = Count - 1; i >= 0; --i) { SetElem(i, Elem(i) * arg.Elem(i)); } }
/// <summary> /// Copies a components from given vector to this /// </summary> public void CopyFrom(ReadOnlyVector original) { CheckLengths(this, original); for (int i = Count - 1; i >= 0; --i) { SetElem(i, original.Elem(i)); } }