Example #1
0
 public IEnumerator <double> GetEnumerator()
 {
     return(Vectors.GetEnumerator(this));
 }
Example #2
0
 /// <summary>
 /// 各要素に<paramref name="value"/>を除算する.
 /// </summary>
 /// <param name="value">スカラ値</param>
 /// <returns>自身への参照</returns>
 public Vector Div(double value)
 {
     return(Vectors.DivEq(this, value));
 }
Example #3
0
 public override string ToString()
 {
     return(Vectors.ToString(this));
 }
Example #4
0
 /// <summary>
 /// このベクトルオブジェクトから<paramref name="v"/>を減算する.
 /// </summary>
 /// <param name="v">ベクトルオブジェクト</param>
 /// <returns>自身への参照</returns>
 public Vector Sub(Vector v)
 {
     return(Vectors.SubEq(this, v));
 }
Example #5
0
 /// <summary>
 /// 各要素に<paramref name="value"/>を乗算する.
 /// </summary>
 /// <param name="value">スカラ値</param>
 /// <returns>自身への参照</returns>
 public Vector Mul(double value)
 {
     return(Vectors.MulEq(this, value));
 }
Example #6
0
 /// <summary>
 /// 各要素に <paramref name="value"/> を加算する.
 /// </summary>
 /// <param name="value">スカラ値</param>
 /// <returns>自身への参照</returns>
 public Vector Add(double value)
 {
     return(Vectors.AddEq(this, value));
 }
Example #7
0
 /// <summary>
 /// このベクトルオブジェクトに<paramref name="v"/>を加算する.
 /// </summary>
 /// <param name="v">ベクトルオブジェクト</param>
 /// <returns>自身への参照</returns>
 public Vector Add(Vector v)
 {
     return(Vectors.AddEq(this, v));
 }
Example #8
0
 /// <summary>
 /// IVector * Vector
 /// </summary>
 public static double operator *(IVector l, Vector r)
 {
     return(Vectors.Dot(l, r));
 }
Example #9
0
 /// <summary>
 /// IVector - Vector
 /// </summary>
 public static IVector operator -(IVector l, Vector r)
 {
     return(Vectors.Sub(l, r, new Vector(l.Size)));
 }
Example #10
0
 /// <summary>
 /// IVector + Vector
 /// </summary>
 public static IVector operator +(IVector l, Vector r)
 {
     return(Vectors.Add(l, r, new Vector(l.Size)));
 }
Example #11
0
 /// <summary>
 /// ベクトルの各要素を 0 にする.
 /// </summary>
 /// <returns>自身への参照</returns>
 public Vector Zero()
 {
     return(Vectors.Zero(this));
 }
Example #12
0
 /// <summary>
 /// ベクトルの各要素の符号を反転する.
 /// </summary>
 /// <returns>自身への参照</returns>
 public Vector Flip()
 {
     return(Vectors.Flip(this));
 }