org.mklab.nfc.matrix
クラス BooleanMatrix

java.lang.Object
  上位を拡張 org.mklab.nfc.matrix.AbstractGrid<A>
      上位を拡張 org.mklab.nfc.matrix.AbstractArray<BooleanMatrix>
          上位を拡張 org.mklab.nfc.matrix.BooleanMatrix
すべての実装されたインタフェース:
Serializable, Cloneable, Array, Grid

public class BooleanMatrix
extends AbstractArray<BooleanMatrix>

booleanを成分とする行列を表すクラスです。

主に、行列の成分毎の比較 (". <", ". <=", ".>", ".>=", ".==", ".!=") の結果を保持するために使用されます。

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

コンストラクタの概要
BooleanMatrix()
          新しく生成されたBooleanMatrixオブジェクトを初期化します。
BooleanMatrix(BaseMatrix<?,?> matrix)
          matrixと同サイズのboolean行列を生成します。
BooleanMatrix(boolean[] elements)
          新しく生成されたBooleanMatrixオブジェクトを初期化します。
BooleanMatrix(boolean[][] elements)
          elementsで与えられた成分をもつboolean行列を生成します。
BooleanMatrix(DoubleMatrix matrix)
          matrixと同サイズのboolean行列を生成します。
BooleanMatrix(int rowSize, int columnSize)
          rowSize*columSizeboolean行列(初期値は< code>false)を生成します。
BooleanMatrix(int rowSize, int columnSize, boolean[][] elements)
          elementsで与えられた成分をもつrowSize*columSizeboolean行列を生成します。
BooleanMatrix(IntMatrix matrix)
          matrixと同サイズのboolean行列を生成します。
BooleanMatrix(Matrix matrix)
          matrixと同サイズのboolean行列を生成します。
 
メソッドの概要
 BooleanMatrix add(BooleanMatrix value)
          行列valueとの和(成分毎の論理和)を返します。
 boolean allTrue()
          全成分を調べ、全成分がtrueならばtrue、そうでなければfalseを返します。
 BooleanMatrix allTrueColumnWise()
          成分を列毎に調べ、列の全成分がtrueならばtrue、 そうでなければfalseを対応させ、 行毎のboolean値からなる BooleanMatrixを返します。
 BooleanMatrix allTrueRowWise()
          成分を行毎に調べ、行の全成分がtrueならばtrue、 そうでなければfalseを対応させ、 行毎のboolean値からなる BooleanMatrixを返します。
 BooleanMatrix andElementWise(boolean value)
          value各成分との論理積を成分にもつBooleanMatrixを返します。
 BooleanMatrix andElementWise(BooleanMatrix value)
          valueの各成分との論理積を成分にもつBooleanMatrix返します。
 boolean anyTrue()
          全成分を調べ、trueが1個でもあればtrue、そうでなければfalse を返します。
 BooleanMatrix anyTrueColumnWise()
          列毎の成分を調べ、行にtrueが1個でもあればtrue、 そうでなければfalseを対応させ、 boolean値を含む BooleanMatrixを返します。
 BooleanMatrix anyTrueRowWise()
          行毎の成分を調べ、行にtrueが1個でもあればtrue、そうでなければfalseを対応させ、 boolean値を含むBooleanMatrixを返します。
 BooleanMatrix appendDown(Array value)
          下側に行列valueを付けた行列を生成します。
 BooleanMatrix appendDown(BooleanMatrix value)
          下側に行列valueを連結した行列を返します。
 BooleanMatrix appendRight(Array value)
          右側にvalueを付けた行列を生成します。
 BooleanMatrix appendRight(BooleanMatrix value)
          右側にvalueを連結した行列を返します。
 BooleanMatrix clone()
          Object#clone()
 BooleanMatrix compareElementWise(String operator, Array opponent)
          opponentと成分毎にoperatorで指定された演算子で比較した結果を BooleanMatrixで返します。
 BooleanMatrix compareElementWise(String operator, BooleanMatrix opponent)
          opponentの各成分とoperatorで指定された演算子で比較し, BooleanMatrixで返します。
 IntMatrix convertIntMatrix()
          この行列をIntMatrixに変換します。
 void copy(Array source)
          originalの成分をコピーします。
 void copy(BooleanMatrix source)
          各成分に行列sourceの各成分をコピーします。
static BooleanMatrix diagonal(boolean[] diagonalElements)
          対角行列を生成します。
 BooleanMatrix diagonalToVector()
          対角成分をからなる縦ベクトルを生成します。
 boolean equals(Object opponent)
           
 void exchangeColumn(int column1, int column2)
          column1列とcolumn2列を入れ替えます。
 void exchangeRow(int row1, int row2)
          row1行とrow2行を入れ替えます。
 BooleanMatrix exorElementWise(boolean value)
          valueの各成分との排他的論理和を成分にもつBooleanMatrixを返します。
 BooleanMatrix exorElementWise(BooleanMatrix value)
          valueの各成分との排他的論理和を成分にもつBooleanMatrixを返します。
 IntMatrix find()
          trueの位置を順にもつ整数ベクトルを返します。
static String getDefaultElementFormat()
          成分のデフォルト出力フォーマットを返します。
 boolean getElement(int index)
          成分を行毎に数え、index番目の成分を返します。
 boolean getElement(int row, int column)
          rowcolumn列の成分を返します。
 int getNumberOfTrue()
          trueである成分の数を返します。
 BooleanMatrix getSubMatrix(int rowMin, int rowMax, int columnMin, int columnMax)
          部分行列A(rowMin:rowMax,columnMin:columnMax)を生成します。
 BooleanMatrix getSubMatrix(int rowMin, int rowMax, IntMatrix columnIndex)
          rowMin行からrowMax行目で、columnIndexで指定された列を成分とする部分行列を生成します。
 BooleanMatrix getSubMatrix(IntMatrix rowIndex, int columnMin, int columnMax)
          columnMin列からcolumnMax列まで、rowIndex で指定された行を成分とする部分行列を生成します。
 BooleanMatrix getSubMatrix(IntMatrix rowIndex, IntMatrix columnIndex)
          rowIndexで指定された行、columnIndex で指定された列を成分とする部分行列を生成します。
 BooleanMatrix getSubVector(IntMatrix index)
          行毎に数えindexで指定した成分を成分とする部分行列を生成します。
 int hashCode()
           
 boolean isZero()
          零行列(全ての成分がデフォルトの初期値)であるか判定します。
 BooleanMatrix multiply(BooleanMatrix value)
          行列valueとの積(成分毎の論理積)を返します。
 BooleanMatrix notElementWise()
          各成分の否定(trueならばfalsefalseならば true) を成分にもつBooleanMatrix行列を返します。
static BooleanMatrix ones(int size)
          size*sizeの全成分がtrueである行列を生成します。
static BooleanMatrix ones(int rowSize, int columnSize)
          rowSize*columnSizeの全成分がtrue である行列を生成します。
static BooleanMatrix ones(Matrix matrix)
          行列matrixと同サイズで全成分trueの行列を生成します。
 BooleanMatrix orElementWise(boolean value)
          valueの各成分との論理和を成分にもつBooleanMatrixを返します。
 BooleanMatrix orElementWise(BooleanMatrix value)
          valueの各成分との論理和を成分にもつBooleanMatrixを返します。
 BooleanMatrix power(int scalar)
          scalar乗(this scalar )を返します。
 void printElements(Writer output)
          ライターに成分を出力します。
 void printElements(Writer output, int maxColumnSize)
          ライターに成分を出力します。
 void removeColumnVectors(int columnMin, int columnMax)
          columnMin列からcolumnMax列までを削除します。
 void removeColumnVectors(IntMatrix columnIndex)
          columnIndexで指定された列を削除します。
 void removeRowVectors(int rowMin, int rowMax)
          rowMin行からrowMax行までを削除します。
 void removeRowVectors(IntMatrix rowIndex)
          rowIndexで指定された行を削除します。
 BooleanMatrix reshape(int newRowSize, int newColumnSize)
          サイズをnewRowSize*newColumnSizeに変更した行列を生成します。
 BooleanMatrix resize(int newRowSize, int newColSize)
          newRowSize*newColumnSizeにサイズ変更します。
static void setDefaultElementFormat(String format)
          成分のデフォルト出力フォーマットを設定します。
 void setElement(int index, boolean value)
          成分を行毎に数えindexで指定した位置にvalueを代入します。
 void setElement(int row, int column, boolean value)
          rowcolumn列にvalueを代入します。
protected  void setSubMatrix(int rowTo, int columnTo, Array source, int rowMin, int rowMax, int columnMin, int columnMax)
          rowTocolumnTo列を始点として、行列sourcerowMin行からrowMax行かつ columnMin列からcolumnMax列までの部分行列を代入します。
 void setSubMatrix(int rowMin, int rowMax, IntMatrix columnIndex, Array source)
          rowMin列目からrowMax列目の成分のcolumnIndex で指定された行の成分に行列sourceを代入します。
 void setSubMatrix(int rowMin, int rowMax, IntMatrix columnIndex, BooleanMatrix source)
          rowMin列からrowMax列目の成分のcolumnIndex で指定された行に、 行列sourceの成分を代入します。
 void setSubMatrix(IntMatrix rowIndex, int columnMin, int columnMax, Array m)
          rowIndexで指定した行のcolumnMin列からcolumnMax 列までの行列sourceを代入します。
 void setSubMatrix(IntMatrix rowIndex, int columnMin, int columnMax, BooleanMatrix source)
          rowIndexで指定した行のcolumnMin列からcolumnMax 列までの 行列sourceを代入します。
 void setSubMatrix(IntMatrix rowIndex, IntMatrix columnIndex, Array source)
          rowIndexで指定した行のcolumnIndexで指定した列に行列sourceを代入します。
 void setSubMatrix(IntMatrix rowIndex, IntMatrix columnIndex, BooleanMatrix source)
          rowIndexで指定した行のcolumnIndexで指定した列に行列sourceを代入します。
 void setSubVector(IntMatrix index, Array source)
          indexで指定した各成分に行列sourceの成分に代入します。
 void setSubVector(IntMatrix index, BooleanMatrix source)
          indexで指定した各成分に行列sourceの成分を代入します。
 String toMmString()
          MMフォーマットの文字列を生成します。
 BooleanMatrix transpose()
          転置行列(this T )を生成します。
static BooleanMatrix unit(int size)
          size*sizeの単位行列(対角成分のみtrue)を生成します。
static BooleanMatrix unit(int rowSize, int columnSize)
          rowSize*columnSizeの単位行列(対角成分のみtrue)を生成します。
static BooleanMatrix unit(int rowNumber, int columnNumber, Matrix block)
          行列blockrowNum * columnNum倍の単位行列を生成します。
static BooleanMatrix unit(Matrix matrix)
          行列matrixと同サイズの単位行列(対角成分のみtrue)を生成します。
 BooleanMatrix vectorToDiagonal()
          縦ベクトルまたは横ベクトルの各成分を対角成分に持つ行列を生成します。
 
クラス org.mklab.nfc.matrix.AbstractArray から継承されたメソッド
flipLeftRight, flipUpDown, getColumnVector, getColumnVectors, getColumnVectors, getRowVector, getRowVectors, getRowVectors, getSubMatrix, getSubMatrix, getSubMatrix, getSubVector, getSubVector, rotateLeft, rotateUp, setColumnVector, setColumnVectors, setColumnVectors, setRowVector, setRowVectors, setRowVectors, setSubMatrix, setSubMatrix, setSubMatrix, setSubMatrix, setSubVector, setSubVector
 
クラス org.mklab.nfc.matrix.AbstractGrid から継承されたメソッド
count, getColumnSize, getDefaultElementAlignment, getElementAlignment, getElementFormat, getGridClassName, getPrintingElementsString, getPrintingString, getRowSize, hasSameColumnSize, hasSameRowSize, isEmpty, isSameSize, isSquare, length, print, print, print, removeColumnVector, removeRowVector, setColumnSize, setDefaultElementAlignment, setElementAlignment, setElementFormat, setRowSize, toString
 
クラス java.lang.Object から継承されたメソッド
finalize, getClass, notify, notifyAll, wait, wait, wait
 
インタフェース org.mklab.nfc.matrix.Grid から継承されたメソッド
count, getColumnSize, getElementAlignment, getElementFormat, getPrintingElementsString, getPrintingString, getRowSize, hasSameColumnSize, hasSameRowSize, isEmpty, isSameSize, isSquare, length, print, print, print, removeColumnVector, removeRowVector, setElementAlignment, setElementFormat
 

コンストラクタの詳細

BooleanMatrix

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

0*0のBooleanMatrixを生成します。


BooleanMatrix

public BooleanMatrix(boolean[] elements)
新しく生成されたBooleanMatrixオブジェクトを初期化します。

elementsで指定した成分をもつBooleanMatrix行列を生成します。

パラメータ:
elements - ベクトルの成分をもつ配列

BooleanMatrix

public BooleanMatrix(int rowSize,
                     int columnSize)
rowSize*columSizeboolean行列(初期値は< code>false)を生成します。

パラメータ:
rowSize - 行の数
columnSize - 列の数

BooleanMatrix

public BooleanMatrix(int rowSize,
                     int columnSize,
                     boolean[][] elements)
elementsで与えられた成分をもつrowSize*columSizeboolean行列を生成します。

パラメータ:
rowSize - 行の数
columnSize - 列の数
elements - 行列の成分をもつ配列

BooleanMatrix

public BooleanMatrix(boolean[][] elements)
elementsで与えられた成分をもつboolean行列を生成します。

パラメータ:
elements - 行列の成分をもつ配列

BooleanMatrix

public BooleanMatrix(Matrix matrix)
matrixと同サイズのboolean行列を生成します。

成分はmatrixの各成分を調べ、零ならばfalse、零以外ならばtrueとなります。

パラメータ:
matrix - 成分をもつ行列

BooleanMatrix

public BooleanMatrix(IntMatrix matrix)
matrixと同サイズのboolean行列を生成します。

成分はmatrixの各成分を調べ、零ならばfalse、零以外ならばtrueとなります。

パラメータ:
matrix - 成分をもつ行列

BooleanMatrix

public BooleanMatrix(DoubleMatrix matrix)
matrixと同サイズのboolean行列を生成します。

成分はmatrixの各成分を調べ、零ならばfalse、零以外ならばtrueとなります。

パラメータ:
matrix - 成分をもつ行列

BooleanMatrix

public BooleanMatrix(BaseMatrix<?,?> matrix)
matrixと同サイズのboolean行列を生成します。

成分はmatrixの各成分を調べ、零ならばfalse、零以外ならばtrueとなります。

パラメータ:
matrix - 成分をもつ行列
メソッドの詳細

setDefaultElementFormat

public static void setDefaultElementFormat(String format)
成分のデフォルト出力フォーマットを設定します。

パラメータ:
format - 成分のデフォルト出力フォーマット

getDefaultElementFormat

public static String getDefaultElementFormat()
成分のデフォルト出力フォーマットを返します。

戻り値:
成分のデフォルト出力フォーマット

clone

public BooleanMatrix clone()
クラス AbstractGrid の記述:
Object#clone()

定義:
インタフェース Grid 内の clone
オーバーライド:
クラス AbstractGrid<BooleanMatrix> 内の clone
戻り値:
複製(クローン)
関連項目:
AbstractGrid.clone()

equals

public boolean equals(Object opponent)
オーバーライド:
クラス Object 内の equals
関連項目:
Object.equals(java.lang.Object)

hashCode

public int hashCode()
オーバーライド:
クラス AbstractGrid<BooleanMatrix> 内の hashCode
関連項目:
Object.hashCode()

getElement

public final boolean getElement(int row,
                                int column)
rowcolumn列の成分を返します。

パラメータ:
row - 行番号
column - 列番号
戻り値:
row行column列の成分

getElement

public final boolean getElement(int index)
成分を行毎に数え、index番目の成分を返します。

パラメータ:
index - 成分の番号
戻り値:
成分

setElement

public final void setElement(int row,
                             int column,
                             boolean value)
rowcolumn列にvalueを代入します。

パラメータ:
row - 行番号
column - 列番号
value - 変更値

setElement

public final void setElement(int index,
                             boolean value)
成分を行毎に数えindexで指定した位置にvalueを代入します。

パラメータ:
index - 成分の番号
value - 設定する値

anyTrue

public boolean anyTrue()
全成分を調べ、trueが1個でもあればtrue、そうでなければfalse を返します。

戻り値:
全成分を調べ、trueが1個でもあればtrue、そうでなければfalse

anyTrueRowWise

public BooleanMatrix anyTrueRowWise()
行毎の成分を調べ、行にtrueが1個でもあればtrue、そうでなければfalseを対応させ、 boolean値を含むBooleanMatrixを返します。

戻り値:
調査の結果を成分とするBooleanMatrix

anyTrueColumnWise

public BooleanMatrix anyTrueColumnWise()
列毎の成分を調べ、行にtrueが1個でもあればtrue、 そうでなければfalseを対応させ、 boolean値を含む BooleanMatrixを返します。

戻り値:
調査の結果を成分とするBooleanMatrix

allTrue

public boolean allTrue()
全成分を調べ、全成分がtrueならばtrue、そうでなければfalseを返します。

戻り値:
全成分がtrueならばtrue、そうでなければfalse

allTrueRowWise

public BooleanMatrix allTrueRowWise()
成分を行毎に調べ、行の全成分がtrueならばtrue、 そうでなければfalseを対応させ、 行毎のboolean値からなる BooleanMatrixを返します。

戻り値:
調査の結果を成分とするBooleanMatrix

allTrueColumnWise

public BooleanMatrix allTrueColumnWise()
成分を列毎に調べ、列の全成分がtrueならばtrue、 そうでなければfalseを対応させ、 行毎のboolean値からなる BooleanMatrixを返します。

戻り値:
調査の結果を成分とするBooleanMatrix

notElementWise

public BooleanMatrix notElementWise()
各成分の否定(trueならばfalsefalseならば true) を成分にもつBooleanMatrix行列を返します。

戻り値:
調査の結果を成分とするBooleanMatrix

andElementWise

public BooleanMatrix andElementWise(BooleanMatrix value)
valueの各成分との論理積を成分にもつBooleanMatrix返します。

パラメータ:
value - 演算の対象
戻り値:
演算の結果を成分とするBooleanMatrix

andElementWise

public BooleanMatrix andElementWise(boolean value)
value各成分との論理積を成分にもつBooleanMatrixを返します。

パラメータ:
value - 全ての演算に用いるboolean
戻り値:
演算の結果を成分とするBooleanMatrix

orElementWise

public BooleanMatrix orElementWise(BooleanMatrix value)
valueの各成分との論理和を成分にもつBooleanMatrixを返します。

パラメータ:
value - 演算の対象
戻り値:
演算の結果を成分とするBooleanMatrix

orElementWise

public BooleanMatrix orElementWise(boolean value)
valueの各成分との論理和を成分にもつBooleanMatrixを返します。

パラメータ:
value - 全ての演算に用いるboolean
戻り値:
演算の結果を成分とするBooleanMatrix

exorElementWise

public BooleanMatrix exorElementWise(BooleanMatrix value)
valueの各成分との排他的論理和を成分にもつBooleanMatrixを返します。

パラメータ:
value - 演算の対象
戻り値:
演算の結果を成分とするBooleanMatrix

exorElementWise

public BooleanMatrix exorElementWise(boolean value)
valueの各成分との排他的論理和を成分にもつBooleanMatrixを返します。

パラメータ:
value - 全ての演算に用いるboolean
戻り値:
演算の結果を成分とするBooleanMatrix

printElements

public final void printElements(Writer output)
インタフェース Grid の記述:
ライターに成分を出力します。

パラメータ:
output - ライター
関連項目:
Grid.printElements(java.io.Writer)

printElements

public final void printElements(Writer output,
                                int maxColumnSize)
インタフェース Grid の記述:
ライターに成分を出力します。

パラメータ:
output - ライター
maxColumnSize - 1行の出力する列の最大数
関連項目:
Grid.printElements(java.io.Writer, int)

reshape

public BooleanMatrix reshape(int newRowSize,
                             int newColumnSize)
インタフェース Array の記述:
サイズをnewRowSize*newColumnSizeに変更した行列を生成します。

成分は、行方向の成分順に並べ替えられます。 newRowSize * newColumnSize個の成分を持たなければ、エラーとなります。

パラメータ:
newRowSize - 行の数
newColumnSize - 列の数
戻り値:
サイズ変更された行列
関連項目:
Array.reshape(int, int)

getNumberOfTrue

public int getNumberOfTrue()
trueである成分の数を返します。

戻り値:
trueの数

find

public IntMatrix find()
trueの位置を順にもつ整数ベクトルを返します。

戻り値:
trueの位置を順にもつ整数ベクトル

unit

public static BooleanMatrix unit(int size)
size*sizeの単位行列(対角成分のみtrue)を生成します。

パラメータ:
size - サイズ
戻り値:
size*sizeの単位行列

unit

public static BooleanMatrix unit(int rowSize,
                                 int columnSize)
rowSize*columnSizeの単位行列(対角成分のみtrue)を生成します。

パラメータ:
rowSize - 行の数
columnSize - 列の数
戻り値:
rowSize*columnSizeの単位行列

unit

public static BooleanMatrix unit(Matrix matrix)
行列matrixと同サイズの単位行列(対角成分のみtrue)を生成します。

パラメータ:
matrix - 行列
戻り値:
単位行列

ones

public static BooleanMatrix ones(Matrix matrix)
行列matrixと同サイズで全成分trueの行列を生成します。

パラメータ:
matrix - 行列
戻り値:
mと同サイズで全成分trueの行列

ones

public static BooleanMatrix ones(int size)
size*sizeの全成分がtrueである行列を生成します。

パラメータ:
size - サイズ指定
戻り値:
rowSize*colSize全成分trueの行列

ones

public static BooleanMatrix ones(int rowSize,
                                 int columnSize)
rowSize*columnSizeの全成分がtrue である行列を生成します。

パラメータ:
rowSize - 行の数
columnSize - 列の数
戻り値:
rowSize*columnSizeの全成分trueの行列

unit

public static BooleanMatrix unit(int rowNumber,
                                 int columnNumber,
                                 Matrix block)
行列blockrowNum * columnNum倍の単位行列を生成します。

パラメータ:
block - 行列
rowNumber - 行方向の倍数
columnNumber - 列方向の倍数
戻り値:
blockrowNum * columnNum倍の単位行列

diagonal

public static BooleanMatrix diagonal(boolean[] diagonalElements)
対角行列を生成します。

パラメータ:
diagonalElements - 対角成分
戻り値:
対角行列

toMmString

public String toMmString()
MMフォーマットの文字列を生成します。

戻り値:
MMフォーマットの文字列

transpose

public BooleanMatrix transpose()
インタフェース Array の記述:
転置行列(this T )を生成します。

戻り値:
転置行列
関連項目:
Array.transpose()

vectorToDiagonal

public BooleanMatrix vectorToDiagonal()
インタフェース Array の記述:
縦ベクトルまたは横ベクトルの各成分を対角成分に持つ行列を生成します。

戻り値:
対角成分からなる縦ベクトル
関連項目:
Array.vectorToDiagonal()

diagonalToVector

public BooleanMatrix diagonalToVector()
インタフェース Array の記述:
対角成分をからなる縦ベクトルを生成します。

戻り値:
対角成分からなる縦ベクトル
関連項目:
Array.diagonalToVector()

setSubMatrix

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

定義:
クラス AbstractArray<BooleanMatrix> 内の setSubMatrix
パラメータ:
rowTo - 変更開始行
columnTo - 変更開始列
source - 行列
rowMin - コピー開始行
rowMax - コピー終了行
columnMin - コピー開始列
columnMax - コピー終了列
関連項目:
AbstractArray.setSubMatrix(int, int, org.mklab.nfc.matrix.Array, int, int, int, int)

setSubMatrix

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

パラメータ:
rowIndex - 行番号のリスト
columnMin - 列の始まり
columnMax - 列の終わり
m - 代入する行列
関連項目:
Array.setSubMatrix(org.mklab.nfc.matrix.IntMatrix, int, int, org.mklab.nfc.matrix.Array)

setSubMatrix

public void setSubMatrix(IntMatrix rowIndex,
                         int columnMin,
                         int columnMax,
                         BooleanMatrix source)
rowIndexで指定した行のcolumnMin列からcolumnMax 列までの 行列sourceを代入します。

パラメータ:
rowIndex - 行番号を指定する指数
columnMin - 列の始まり
columnMax - 列の終わり
source - 代入する行列

setSubMatrix

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

パラメータ:
rowMin - 行の始まり
rowMax - 行の終わり
columnIndex - 列番号のリスト
source - 代入する行列
関連項目:
Array.setSubMatrix(int, int, org.mklab.nfc.matrix.IntMatrix, org.mklab.nfc.matrix.Array)

setSubMatrix

public void setSubMatrix(int rowMin,
                         int rowMax,
                         IntMatrix columnIndex,
                         BooleanMatrix source)
rowMin列からrowMax列目の成分のcolumnIndex で指定された行に、 行列sourceの成分を代入します。

パラメータ:
rowMin - 行の始まり
rowMax - 行の終わり
columnIndex - 列指定ベクトル
source - 代入する行列

setSubMatrix

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

パラメータ:
rowIndex - 行番号のリスト
columnIndex - 列番号のリスト
source - 代入する行列
関連項目:
Array.setSubMatrix(org.mklab.nfc.matrix.IntMatrix, org.mklab.nfc.matrix.IntMatrix, org.mklab.nfc.matrix.Array)

setSubMatrix

public void setSubMatrix(IntMatrix rowIndex,
                         IntMatrix columnIndex,
                         BooleanMatrix source)
rowIndexで指定した行のcolumnIndexで指定した列に行列sourceを代入します。

パラメータ:
rowIndex - 行番号を指定する指数
columnIndex - 列番号を指定する指数
source - 代入する行列

setSubVector

public void setSubVector(IntMatrix index,
                         Array source)
インタフェース Array の記述:
indexで指定した各成分に行列sourceの成分に代入します。

パラメータ:
index - 成分の番号のリスト
source - 代入する行列
関連項目:
Array.setSubVector(org.mklab.nfc.matrix.IntMatrix, org.mklab.nfc.matrix.Array)

setSubVector

public void setSubVector(IntMatrix index,
                         BooleanMatrix source)
indexで指定した各成分に行列sourceの成分を代入します。

パラメータ:
index - 成分の番号を指定する指数
source - 代入するベクトル

copy

public void copy(Array source)
インタフェース Array の記述:
originalの成分をコピーします。

パラメータ:
source - コピーする行列
関連項目:
Array.copy(org.mklab.nfc.matrix.Array)

copy

public void copy(BooleanMatrix source)
各成分に行列sourceの各成分をコピーします。

パラメータ:
source - 行列

compareElementWise

public BooleanMatrix compareElementWise(String operator,
                                        Array opponent)
インタフェース Array の記述:
opponentと成分毎にoperatorで指定された演算子で比較した結果を BooleanMatrixで返します。

パラメータ:
operator - 比較演算子(". <", ". <=", ".>", ".>=", ".==", ".!=")
opponent - 比較対象
戻り値:
各成分に比較結果が入ったBooleanMatrix
関連項目:
Array.compareElementWise(java.lang.String, org.mklab.nfc.matrix.Array)

compareElementWise

public BooleanMatrix compareElementWise(String operator,
                                        BooleanMatrix opponent)
opponentの各成分とoperatorで指定された演算子で比較し, BooleanMatrixで返します。

パラメータ:
operator - 比較演算子(".==", ".!=")
opponent - 比較対象
戻り値:
各成分に比較結果が入ったBooleanMatrix

appendDown

public BooleanMatrix appendDown(Array value)
インタフェース Array の記述:
下側に行列valueを付けた行列を生成します。

パラメータ:
value - 付ける行列
戻り値:
下側にvalueをつけた行列
関連項目:
Array.appendDown(org.mklab.nfc.matrix.Array)

appendDown

public BooleanMatrix appendDown(BooleanMatrix value)
下側に行列valueを連結した行列を返します。

パラメータ:
value - つける行列
戻り値:
下側にmを連結した行列

appendRight

public BooleanMatrix appendRight(Array value)
インタフェース Array の記述:
右側にvalueを付けた行列を生成します。

パラメータ:
value - 付ける複素数
戻り値:
右側にvalueを付けた行列
関連項目:
Array.appendRight(org.mklab.nfc.matrix.Array)

appendRight

public BooleanMatrix appendRight(BooleanMatrix value)
右側にvalueを連結した行列を返します。

パラメータ:
value - 連結するBooleanMatrix
戻り値:
右側にvalueを連結した行列

getSubMatrix

public BooleanMatrix getSubMatrix(int rowMin,
                                  int rowMax,
                                  int columnMin,
                                  int columnMax)
インタフェース Array の記述:
部分行列A(rowMin:rowMax,columnMin:columnMax)を生成します。

パラメータ:
rowMin - 行の始まり
rowMax - 行の終わり
columnMin - 列の始まり
columnMax - 列の終わり
戻り値:
指定された部分行列
関連項目:
Array.getSubMatrix(int, int, int, int)

getSubMatrix

public BooleanMatrix getSubMatrix(int rowMin,
                                  int rowMax,
                                  IntMatrix columnIndex)
インタフェース Array の記述:
rowMin行からrowMax行目で、columnIndexで指定された列を成分とする部分行列を生成します。

パラメータ:
rowMin - 行の始まり
rowMax - 行の終わり
columnIndex - 列指定ベクトル
戻り値:
部分行列
関連項目:
Array.getSubMatrix(int, int, org.mklab.nfc.matrix.IntMatrix)

getSubMatrix

public BooleanMatrix getSubMatrix(IntMatrix rowIndex,
                                  IntMatrix columnIndex)
インタフェース Array の記述:
rowIndexで指定された行、columnIndex で指定された列を成分とする部分行列を生成します。

パラメータ:
rowIndex - 行指定ベクトル
columnIndex - 列指定ベクトル
戻り値:
部分行列
関連項目:
Array.getSubMatrix(org.mklab.nfc.matrix.IntMatrix, org.mklab.nfc.matrix.IntMatrix)

getSubMatrix

public BooleanMatrix getSubMatrix(IntMatrix rowIndex,
                                  int columnMin,
                                  int columnMax)
インタフェース Array の記述:
columnMin列からcolumnMax列まで、rowIndex で指定された行を成分とする部分行列を生成します。

パラメータ:
rowIndex - 行指定ベクトル
columnMin - 列のはじまり
columnMax - 列の終わり
戻り値:
指定された部分行列
関連項目:
Array.getSubMatrix(org.mklab.nfc.matrix.IntMatrix, int, int)

getSubVector

public BooleanMatrix getSubVector(IntMatrix index)
インタフェース Array の記述:
行毎に数えindexで指定した成分を成分とする部分行列を生成します。

パラメータ:
index - 行番号を含むベクトル
戻り値:
部分行列
関連項目:
Array.getSubVector(org.mklab.nfc.matrix.IntMatrix)

exchangeColumn

public void exchangeColumn(int column1,
                           int column2)
インタフェース Grid の記述:
column1列とcolumn2列を入れ替えます。

パラメータ:
column1 - 列番号1
column2 - 列番号2
関連項目:
Grid.exchangeColumn(int, int)

exchangeRow

public void exchangeRow(int row1,
                        int row2)
インタフェース Grid の記述:
row1行とrow2行を入れ替えます。

パラメータ:
row1 - 行番号1
row2 - 行番号1
関連項目:
Grid.exchangeRow(int, int)

resize

public BooleanMatrix resize(int newRowSize,
                            int newColSize)
インタフェース Array の記述:
newRowSize*newColumnSizeにサイズ変更します。

Array.reshape(int, int)とは異なり、成分位置の変更はせず, 自身より大きなサイズに変更する時は、 0が埋められ、自身より小さなサイズに変更する時は余分な成分は切り取られます。

パラメータ:
newRowSize - 指定行の数
newColSize - 指定列の数
戻り値:
サイズ変更後の行列
関連項目:
Array.resize(int, int)

removeColumnVectors

public void removeColumnVectors(int columnMin,
                                int columnMax)
インタフェース Grid の記述:
columnMin列からcolumnMax列までを削除します。

パラメータ:
columnMin - 列の始まり
columnMax - 列の終わり
関連項目:
Grid.removeColumnVectors(int, int)

removeColumnVectors

public void removeColumnVectors(IntMatrix columnIndex)
インタフェース Grid の記述:
columnIndexで指定された列を削除します。

パラメータ:
columnIndex - 列指定ベクトル
関連項目:
Grid.removeColumnVectors(org.mklab.nfc.matrix.IntMatrix)

removeRowVectors

public void removeRowVectors(int rowMin,
                             int rowMax)
インタフェース Grid の記述:
rowMin行からrowMax行までを削除します。

パラメータ:
rowMin - 行の始まり
rowMax - 行の終わり
関連項目:
Grid.removeRowVectors(int, int)

removeRowVectors

public void removeRowVectors(IntMatrix rowIndex)
インタフェース Grid の記述:
rowIndexで指定された行を削除します。

パラメータ:
rowIndex - 行指定ベクトル
関連項目:
Grid.removeRowVectors(org.mklab.nfc.matrix.IntMatrix)

power

public BooleanMatrix power(int scalar)
scalar乗(this scalar )を返します。

パラメータ:
scalar - 指数
戻り値:
scalar乗

add

public BooleanMatrix add(BooleanMatrix value)
行列valueとの和(成分毎の論理和)を返します。

パラメータ:
value - 行列
戻り値:
valueとの和(成分毎の論理和)

multiply

public BooleanMatrix multiply(BooleanMatrix value)
行列valueとの積(成分毎の論理積)を返します。

パラメータ:
value - 行列
戻り値:
valueとの積(成分毎の論理積)

isZero

public boolean isZero()
インタフェース Grid の記述:
零行列(全ての成分がデフォルトの初期値)であるか判定します。

戻り値:
零行列(全ての成分がデフォルトの初期値)ならばtrue、そうでなければfalse
関連項目:
Grid.isZero()

convertIntMatrix

public IntMatrix convertIntMatrix()
この行列をIntMatrixに変換します。

戻り値:
変換したIntMatrix