Example #1
0
 ///<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));
     }
 }
Example #2
0
 /// <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));
     }
 }
Example #3
0
 ///<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));
     }
 }
Example #4
0
 /// <summary>
 ///   Creates an instance of LockedVector over given vector
 /// </summary>
 public LockedVector(ReadOnlyVector vector)
 {
     this.vector = vector;
     Elem        = vector.Elem;
 }