org.mklab.nfc.matrix
クラス AbstractArray<A extends Array>

java.lang.Object
  上位を拡張 org.mklab.nfc.matrix.AbstractGrid<A>
      上位を拡張 org.mklab.nfc.matrix.AbstractArray<A>
型パラメータ:
A - 配列の型
すべての実装されたインタフェース:
Serializable, Cloneable, Array, Grid
直系の既知のサブクラス:
BaseArray, BooleanMatrix

public abstract class AbstractArray<A extends Array>
extends AbstractGrid<A>
implements Array

配列データを扱うためのクラスです。

バージョン:
$Revision: 1.41 $
作成者:
koga
関連項目:
直列化された形式

コンストラクタの概要
AbstractArray(int rowSize, int columnSize)
          新しく生成されたAbstractArrayオブジェクトを初期化します。
 
メソッドの概要
 A flipLeftRight()
          左右の列を反転した行列を生成します。
 A flipUpDown()
          上下の行を反転した行列を生成します。
 A getColumnVector(int column)
          指定された列を返します。
 A getColumnVectors(int columnMin, int columnMax)
          columnMin列からcolumnMax列までの部分行列を生成します。
 A getColumnVectors(IntMatrix columnIndex)
          columnIndexで指定された列からなる部分行列を生成します。
 A getRowVector(int row)
          指定された行を返します。
 A getRowVectors(int rowMin, int rowMax)
          rowMin行からrowMax行までの部分行列を生成します。
 A getRowVectors(IntMatrix rowIndex)
          rowIndexで指定された行からなる部分行列を生成します。
 A getSubMatrix(int row, int column, Grid block)
          blockのサイズで分割したときのrow行、 column列番目のブロック行列を返します。
 A getSubMatrix(int row, IntMatrix columnIndex)
          row行ベクトルのcolumnIndexで指定された成分からなる行ベクトルを生成します。
 A getSubMatrix(IntMatrix rowIndex, int column)
          column列ベクトルのrowIndexで指定された成分からなる列ベクトルを生成します。
 A getSubVector(int min, int max)
          成分を行毎に数え、minからmaxまでの成分からなるベクトルを生成します。
 A getSubVector(int min, int max, int by)
          成分を行毎に数え、minからmaxまでのby 飛び成分からなるベクトルを生成します。
 A rotateLeft(int number)
          全ての成分を左方向へ回転します。
 A rotateUp(int number)
          全ての成分を上方向へ回転します。
 void setColumnVector(int column, Array source)
          指定された列にsourceを代入します。
 void setColumnVectors(int columnMin, int columnMax, Array source)
          columnMin列からcolumnMax列にsourceを代入します。
 void setColumnVectors(IntMatrix columnIndex, Array source)
          指定された列にsourceを代入します。
 void setRowVector(int row, Array source)
          指定された行にsourceを代入します。
 void setRowVectors(int rowMin, int rowMax, Array source)
          rowMin行からrowMax行にsourceを代入します。
 void setRowVectors(IntMatrix rowIndex, Array source)
          指定された複数の行にsourceを代入します。
protected abstract  void setSubMatrix(int rowTo, int columnTo, Array source, int rowMin, int rowMax, int columnMin, int columnMax)
          rowTocolumnTo列を始点として、行列sourcerowMin行からrowMax行かつ columnMin列からcolumnMax列までの部分行列を代入します。
 void setSubMatrix(int row, int column, Grid block, Array source)
          指定した成分に行列sourceを代入します。
 void setSubMatrix(int rowMin, int rowMax, int columnMin, int columnMax, Array source)
          指定した成分に行列sourceを代入します。
 void setSubMatrix(int row, IntMatrix columnIndex, Array source)
          row列目の成分のcolumnIndexで指定された行の成分に行列sourceを代入します。
 void setSubMatrix(IntMatrix rowIndex, int column, Array source)
          rowIndexで指定した行のcolumn列に行列source を代入します。
 void setSubVector(int min, int max, Array source)
          成分を行毎に数え、minからmaxまでにsourceの成分を代入します。
 void setSubVector(int min, int max, int by, Array source)
          成分を行毎に数え、minからmaxまでの成分にby飛びで sourceの成分を代入します。
 
クラス org.mklab.nfc.matrix.AbstractGrid から継承されたメソッド
clone, count, getColumnSize, getDefaultElementAlignment, getDefaultElementFormat, getElementAlignment, getElementFormat, getGridClassName, getPrintingElementsString, getPrintingString, getRowSize, hashCode, hasSameColumnSize, hasSameRowSize, isEmpty, isSameSize, isSquare, length, print, print, print, removeColumnVector, removeRowVector, setColumnSize, setDefaultElementAlignment, setDefaultElementFormat, setElementAlignment, setElementFormat, setRowSize, toString
 
クラス java.lang.Object から継承されたメソッド
equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 
インタフェース org.mklab.nfc.matrix.Array から継承されたメソッド
appendDown, appendRight, compareElementWise, copy, diagonalToVector, getSubMatrix, getSubMatrix, getSubMatrix, getSubMatrix, getSubVector, reshape, resize, setSubMatrix, setSubMatrix, setSubMatrix, setSubVector, transpose, vectorToDiagonal
 
インタフェース org.mklab.nfc.matrix.Grid から継承されたメソッド
clone, count, exchangeColumn, exchangeRow, getColumnSize, getElementAlignment, getElementFormat, getPrintingElementsString, getPrintingString, getRowSize, hasSameColumnSize, hasSameRowSize, isEmpty, isSameSize, isSquare, isZero, length, print, print, print, printElements, printElements, removeColumnVector, removeColumnVectors, removeColumnVectors, removeRowVector, removeRowVectors, removeRowVectors, setElementAlignment, setElementFormat
 

コンストラクタの詳細

AbstractArray

public AbstractArray(int rowSize,
                     int columnSize)
新しく生成されたAbstractArrayオブジェクトを初期化します。

パラメータ:
rowSize - 行の数
columnSize - 列の数
メソッドの詳細

getRowVector

public A getRowVector(int row)
インタフェース Array の記述:
指定された行を返します。

定義:
インタフェース Array 内の getRowVector
パラメータ:
row - 行番号
戻り値:
指定された行
関連項目:
Array.getRowVector(int)

getRowVectors

public A getRowVectors(int rowMin,
                       int rowMax)
インタフェース Array の記述:
rowMin行からrowMax行までの部分行列を生成します。

定義:
インタフェース Array 内の getRowVectors
パラメータ:
rowMin - 行の始まり
rowMax - 行のおわり
戻り値:
部分行列
関連項目:
Array.getRowVectors(int, int)

getRowVectors

public A getRowVectors(IntMatrix rowIndex)
インタフェース Array の記述:
rowIndexで指定された行からなる部分行列を生成します。

定義:
インタフェース Array 内の getRowVectors
パラメータ:
rowIndex - 取り出す行番号
戻り値:
部分行列
関連項目:
Array.getRowVectors(org.mklab.nfc.matrix.IntMatrix)

getColumnVector

public A getColumnVector(int column)
インタフェース Array の記述:
指定された列を返します。

定義:
インタフェース Array 内の getColumnVector
パラメータ:
column - 列番号
戻り値:
指定された列
関連項目:
Array.getColumnVector(int)

getColumnVectors

public A getColumnVectors(int columnMin,
                          int columnMax)
インタフェース Array の記述:
columnMin列からcolumnMax列までの部分行列を生成します。

定義:
インタフェース Array 内の getColumnVectors
パラメータ:
columnMin - 列の始まり
columnMax - 列の終わり
戻り値:
部分行列
関連項目:
Array.getColumnVectors(int, int)

getColumnVectors

public A getColumnVectors(IntMatrix columnIndex)
インタフェース Array の記述:
columnIndexで指定された列からなる部分行列を生成します。

定義:
インタフェース Array 内の getColumnVectors
パラメータ:
columnIndex - 取り出す列番号
戻り値:
部分行列
関連項目:
Array.getColumnVectors(org.mklab.nfc.matrix.IntMatrix)

getSubMatrix

public A getSubMatrix(int row,
                      int column,
                      Grid block)
インタフェース Array の記述:
blockのサイズで分割したときのrow行、 column列番目のブロック行列を返します。

定義:
インタフェース Array 内の getSubMatrix
パラメータ:
row - 行番号
column - 列番号
block - 基本ブロック行列
戻り値:
部分行列
関連項目:
Array.getSubMatrix(int, int, org.mklab.nfc.matrix.Grid)

getSubMatrix

public A getSubMatrix(IntMatrix rowIndex,
                      int column)
インタフェース Array の記述:
column列ベクトルのrowIndexで指定された成分からなる列ベクトルを生成します。

定義:
インタフェース Array 内の getSubMatrix
パラメータ:
rowIndex - 行指定ベクトル
column - 列指定
戻り値:
指定された部分行列
関連項目:
Array.getSubMatrix(org.mklab.nfc.matrix.IntMatrix, int)

getSubMatrix

public A getSubMatrix(int row,
                      IntMatrix columnIndex)
インタフェース Array の記述:
row行ベクトルのcolumnIndexで指定された成分からなる行ベクトルを生成します。

定義:
インタフェース Array 内の getSubMatrix
パラメータ:
row - 行指定
columnIndex - 列指定ベクトル
戻り値:
部分行列
関連項目:
Array.getSubMatrix(int, org.mklab.nfc.matrix.IntMatrix)

getSubVector

public A getSubVector(int min,
                      int max)
インタフェース Array の記述:
成分を行毎に数え、minからmaxまでの成分からなるベクトルを生成します。

定義:
インタフェース Array 内の getSubVector
パラメータ:
min - 成分取り出し開始位置
max - 成分取り出し終了位置
戻り値:
fromからtoまでの成分を持つ横ベクトル
関連項目:
Array.getSubVector(int, int)

getSubVector

public A getSubVector(int min,
                      int max,
                      int by)
インタフェース Array の記述:
成分を行毎に数え、minからmaxまでのby 飛び成分からなるベクトルを生成します。

定義:
インタフェース Array 内の getSubVector
パラメータ:
min - 成分取り出し開始位置
max - 成分取り出し終了位置
by - 飛ばす数
戻り値:
fromからtoまでの成分を持つ横ベクトル
関連項目:
Array.getSubVector(int, int, int)

flipLeftRight

public A flipLeftRight()
インタフェース Array の記述:
左右の列を反転した行列を生成します。

定義:
インタフェース Array 内の flipLeftRight
戻り値:
左右反転した行列
関連項目:
Array.flipLeftRight()

flipUpDown

public A flipUpDown()
インタフェース Array の記述:
上下の行を反転した行列を生成します。

定義:
インタフェース Array 内の flipUpDown
戻り値:
上下反転した行列
関連項目:
Array.flipUpDown()

rotateUp

public A rotateUp(int number)
インタフェース Array の記述:
全ての成分を上方向へ回転します。numberが負の場合、下方向へ回転します。

定義:
インタフェース Array 内の rotateUp
パラメータ:
number - 回転で進む数
戻り値:
全ての成分を上方向へ回転した行列
関連項目:
Array.rotateUp(int)

rotateLeft

public A rotateLeft(int number)
インタフェース Array の記述:
全ての成分を左方向へ回転します。numberが負の場合、右方向へ回転します。

定義:
インタフェース Array 内の rotateLeft
パラメータ:
number - 回転で進む数
戻り値:
全ての成分を左方向へ回転した行列
関連項目:
Array.rotateLeft(int)

setRowVector

public void setRowVector(int row,
                         Array source)
インタフェース Array の記述:
指定された行にsourceを代入します。

定義:
インタフェース Array 内の setRowVector
パラメータ:
row - 行番号
source - 代入する行列
関連項目:
Array.setRowVector(int, org.mklab.nfc.matrix.Array)

setRowVectors

public void setRowVectors(int rowMin,
                          int rowMax,
                          Array source)
インタフェース Array の記述:
rowMin行からrowMax行にsourceを代入します。

定義:
インタフェース Array 内の setRowVectors
パラメータ:
rowMin - 行番号(始まり)
rowMax - 行番号(おわり)
source - 代入する行列
関連項目:
Array.setRowVectors(int, int, org.mklab.nfc.matrix.Array)

setRowVectors

public void setRowVectors(IntMatrix rowIndex,
                          Array source)
インタフェース Array の記述:
指定された複数の行にsourceを代入します。

定義:
インタフェース Array 内の setRowVectors
パラメータ:
rowIndex - 行番号
source - 代入する行列
関連項目:
Array.setRowVectors(org.mklab.nfc.matrix.IntMatrix, org.mklab.nfc.matrix.Array)

setColumnVector

public void setColumnVector(int column,
                            Array source)
インタフェース Array の記述:
指定された列にsourceを代入します。

定義:
インタフェース Array 内の setColumnVector
パラメータ:
column - 列番号
source - 代入する行列
関連項目:
Array.setColumnVector(int, org.mklab.nfc.matrix.Array)

setColumnVectors

public void setColumnVectors(int columnMin,
                             int columnMax,
                             Array source)
インタフェース Array の記述:
columnMin列からcolumnMax列にsourceを代入します。

定義:
インタフェース Array 内の setColumnVectors
パラメータ:
columnMin - 列の始まり
columnMax - 列のおわり
source - 代入する行列
関連項目:
Array.setColumnVectors(int, int, org.mklab.nfc.matrix.Array)

setColumnVectors

public void setColumnVectors(IntMatrix columnIndex,
                             Array source)
インタフェース Array の記述:
指定された列にsourceを代入します。

定義:
インタフェース Array 内の setColumnVectors
パラメータ:
columnIndex - 列番号
source - 代入する行列
関連項目:
Array.setColumnVectors(org.mklab.nfc.matrix.IntMatrix, org.mklab.nfc.matrix.Array)

setSubMatrix

public void setSubMatrix(int rowMin,
                         int rowMax,
                         int columnMin,
                         int columnMax,
                         Array source)
インタフェース Array の記述:
指定した成分に行列sourceを代入します。

定義:
インタフェース Array 内の setSubMatrix
パラメータ:
rowMin - 開始行番号
rowMax - 終了行番号
columnMin - 開始列番号
columnMax - 終了列番号
source - 代入する行列
関連項目:
Array.setSubMatrix(int, int, int, int, org.mklab.nfc.matrix.Array)

setSubMatrix

public void setSubMatrix(int row,
                         int column,
                         Grid block,
                         Array source)
インタフェース Array の記述:
指定した成分に行列sourceを代入します。

定義:
インタフェース Array 内の setSubMatrix
パラメータ:
row - 行番号
column - 列番号
block - 基本ブロック行列
source - 代入する行列
関連項目:
Array.setSubMatrix(int, int, org.mklab.nfc.matrix.Grid, org.mklab.nfc.matrix.Array)

setSubMatrix

public void setSubMatrix(IntMatrix rowIndex,
                         int column,
                         Array source)
インタフェース Array の記述:
rowIndexで指定した行のcolumn列に行列source を代入します。

定義:
インタフェース Array 内の setSubMatrix
パラメータ:
rowIndex - 行番号のリスト
column - 列番号
source - 代入する行列
関連項目:
Array.setSubMatrix(org.mklab.nfc.matrix.IntMatrix, int, org.mklab.nfc.matrix.Array)

setSubMatrix

public void setSubMatrix(int row,
                         IntMatrix columnIndex,
                         Array source)
インタフェース Array の記述:
row列目の成分のcolumnIndexで指定された行の成分に行列sourceを代入します。

定義:
インタフェース Array 内の setSubMatrix
パラメータ:
row - 行番号
columnIndex - 列番号のリスト
source - 代入する行列
関連項目:
Array.setSubMatrix(int, org.mklab.nfc.matrix.IntMatrix, org.mklab.nfc.matrix.Array)

setSubMatrix

protected abstract void setSubMatrix(int rowTo,
                                     int columnTo,
                                     Array source,
                                     int rowMin,
                                     int rowMax,
                                     int columnMin,
                                     int columnMax)
rowTocolumnTo列を始点として、行列sourcerowMin行からrowMax行かつ columnMin列からcolumnMax列までの部分行列を代入します。

パラメータ:
rowTo - 変更開始行
columnTo - 変更開始列
source - 行列
rowMin - コピー開始行
rowMax - コピー終了行
columnMin - コピー開始列
columnMax - コピー終了列

setSubVector

public void setSubVector(int min,
                         int max,
                         Array source)
インタフェース Array の記述:
成分を行毎に数え、minからmaxまでにsourceの成分を代入します。

定義:
インタフェース Array 内の setSubVector
パラメータ:
min - 成分の代入開始位置
max - 成分の代入終了位置
source - 代入するベクトル
関連項目:
Array.setSubVector(int, int, org.mklab.nfc.matrix.Array)

setSubVector

public void setSubVector(int min,
                         int max,
                         int by,
                         Array source)
インタフェース Array の記述:
成分を行毎に数え、minからmaxまでの成分にby飛びで sourceの成分を代入します。

定義:
インタフェース Array 内の setSubVector
パラメータ:
min - 成分の代入開始位置
max - 成分の代入終了位置
by - 飛ばす数
source - 代入するベクトル
関連項目:
Array.setSubVector(int, int, int, org.mklab.nfc.matrix.Array)