예제 #1
0
 /// <summary>
 /// 列コレクションから指定された列を取得する.
 /// </summary>
 /// <param name="indexes">取得したい列のindex配列</param>
 /// <returns>引数で指定された列セットの列コレクション</returns>
 public IVectorCollection this[params int[] indexes]
 {
     get
     {
         CollectionImpl.CheckIndexes(this, indexes);
         return(new SubCollection(this, indexes, CollectionType.Columns));
     }
 }
예제 #2
0
 public IVector this[int index]
 {
     get
     {
         return(this._body[this._indexes[index]]);
     }
     set
     {
         CollectionImpl.Setter(this, index, value);
     }
 }
예제 #3
0
 /// <summary>
 /// 列コレクションから,指定した列の取得・設定を行う.
 /// </summary>
 /// <param name="c">列index</param>
 /// <returns>列ベクトル</returns>
 public IVector this[int c]
 {
     get
     {
         if (c < 0 || this.Count <= c)
         {
             throw new IndexOutOfRangeException();
         }
         return(new RefVector(this._body, c * this._rsize, 1, this._rsize));
     }
     set
     {
         CollectionImpl.Setter(this, c, value);
     }
 }
예제 #4
0
 /// <summary>
 /// 行コレクションから,指定した行の取得・設定を行う.
 /// </summary>
 /// <param name="r">行index</param>
 /// <returns>行ベクトル</returns>
 public IVector this[int r]
 {
     get
     {
         if (r < 0 || this.Count <= r)
         {
             throw new IndexOutOfRangeException();
         }
         return(new RefVector(this._body, r, this._rsize, this._csize));
     }
     set
     {
         CollectionImpl.Setter(this, r, value);
     }
 }
예제 #5
0
 /// <summary>
 /// 保持しているコレクションから,新しい<see cref="Matrix"/>オブジェクトを作成する.
 /// </summary>
 /// <returns><see cref="Matrix"/>オブジェクト</returns>
 public Matrix ToMatrix()
 {
     return(CollectionImpl.ColumnsToMatrix(this));
 }
예제 #6
0
 /// <summary>
 /// 部分コレクションを返す.
 /// </summary>
 /// <param name="startIndex">開始index</param>
 /// <param name="count">取得するコレクションの数</param>
 /// <returns><paramref name="startIndex"/>からはじまる長さ<paramref name="count"/>の部分コレクション</returns>
 public IVectorCollection Subcollection(int startIndex, int count)
 {
     return(CollectionImpl.Subcollection(this, CollectionType.Columns, startIndex, count));
 }
예제 #7
0
 /// <summary>
 /// コレクションに action を適用する.
 /// </summary>
 /// <param name="action"><see cref="VectorCollectionActionWithIndex"/>で規定されるアクション</param>
 /// <returns>適用後の自身への参照</returns>
 public IVectorCollection ForEach(VectorCollectionActionWithIndex action)
 {
     return(CollectionImpl.ForEach(this, action));
 }
예제 #8
0
 /// <summary>
 /// 列挙子を取得する.
 /// </summary>
 /// <returns>列挙子</returns>
 public IEnumerator <IVector> GetEnumerator()
 {
     return(CollectionImpl.Enumerator(this));
 }
예제 #9
0
 IEnumerator IEnumerable.GetEnumerator()
 {
     return(CollectionImpl.Enumerator(this));
 }
예제 #10
0
 /// <summary>
 /// 指定された列を入れ替える.
 /// </summary>
 /// <param name="index1">列Index</param>
 /// <param name="index2">列Index</param>
 /// <returns>入れ替え後の自身への参照</returns>
 public IVectorCollection Swap(int index1, int index2)
 {
     return(CollectionImpl.Swap(this, index1, index2));
 }
예제 #11
0
 Matrix IVectorCollection.ToMatrix()
 {
     return(CollectionImpl.ToMatrix(this, this._type));
 }
예제 #12
0
 public IVectorCollection Subcollection(int startIndex, int length)
 {
     return(CollectionImpl.Subcollection(this, this._type, startIndex, length));
 }
예제 #13
0
 /// <summary>
 /// 部分コレクションを返す.
 /// </summary>
 /// <param name="startIndex">開始index</param>
 /// <returns><paramref name="startIndex"/>から<c><see cref="IVectorCollection.Count"/>-1</c>までの部分コレクション</returns>
 public IVectorCollection Subcollection(int startIndex)
 {
     return(CollectionImpl.Subcollection(this, CollectionType.Rows, startIndex));
 }