|
|||||||||
前のクラス 次のクラス | フレームあり フレームなし | ||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Objectfigure.AbstractMatrix
figure.SparseMatrix
public class SparseMatrix
疎行列クラス
0 でない成分のみデータを保持する
入れ子のクラスの概要 | |
---|---|
static class |
SparseMatrix.Data
成分データクラス |
static class |
SparseMatrix.RowData
行データクラス |
フィールドの概要 | |
---|---|
protected int |
columnCount
列の数 |
protected int |
rowCount
行の数 |
protected SparseMatrix.RowData[] |
rowdata
行データを格納した配列 |
クラス figure.AbstractMatrix から継承されたフィールド |
---|
dataMax, TOLERANCE |
コンストラクタの概要 | |
---|---|
SparseMatrix(int size)
正方行列を構築する |
|
SparseMatrix(int rowCount,
int columnCount)
行列を構築する |
メソッドの概要 | |
---|---|
void |
add(int row,
int column,
double value)
成分に値を加える |
void |
add(Matrix m)
行列を加える |
java.lang.Object |
clone()
オブジェクトのコピーを返す |
int |
columnCount()
列の数を返す |
int |
columnCount(int row)
成分が 0 でない列の数を返す |
Matrix |
eliminateRowColumn(int row,
int column)
指定した行・列を消去した行列を返す |
Matrix |
extructRowColumn(int size,
int[] rows,
int[] columns)
指定した行・列を取り出した行列を返す |
double |
get(int row,
int column)
成分を返す |
SparseMatrix.Data |
getData(int row,
int column)
成分データを返す |
double |
getDiagonal(int row)
対角成分を返す |
int |
getDiagonalColumn(int row)
対角成分データの列インデックスを返す |
int |
getNonZeroCount()
0 でない成分の数を返す |
SparseMatrix.RowData |
getRowData(int row)
行データを返す |
void |
init()
行列を初期化する |
void |
mul(double value)
スカラーを掛ける |
static Matrix |
mul(Matrix left,
Matrix right)
行列の積を計算する |
Vector |
mul(Vector v)
この行列とベクトルの積を返す |
int |
rowCount()
行の数を返す |
void |
set(int row,
int column,
double value)
成分に値を設定する |
void |
setRowData(int row,
SparseMatrix.RowData rowdata)
行データを設定する |
Matrix |
transposition()
転置行列を返す |
static Matrix |
unitMatrix(int size)
単位行列を返す |
クラス figure.AbstractMatrix から継承されたメソッド |
---|
checkRange, determinant, equals, getColumnVector, getColumnVectors, getRowVector, getRowVectors, hashCode, isSymmetry, toString, toStrings, trace |
クラス java.lang.Object から継承されたメソッド |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
フィールドの詳細 |
---|
protected int rowCount
protected int columnCount
protected SparseMatrix.RowData[] rowdata
コンストラクタの詳細 |
---|
public SparseMatrix(int size)
size
- 行列の大きさpublic SparseMatrix(int rowCount, int columnCount)
rowCount
- 行の数columnCount
- 列の数メソッドの詳細 |
---|
public int rowCount()
public int columnCount()
public int columnCount(int row)
row
- 行
public int getNonZeroCount()
public double get(int row, int column)
row
- 行column
- 列
public double getDiagonal(int row)
row
- 行
public SparseMatrix.Data getData(int row, int column)
row
- 行column
- 列
public int getDiagonalColumn(int row)
row
- 行
public SparseMatrix.RowData getRowData(int row)
row
- 行
public void set(int row, int column, double value)
row
- 行column
- 列value
- 設定する値public void setRowData(int row, SparseMatrix.RowData rowdata)
row
- 行rowdata
- 加える行データpublic void add(int row, int column, double value)
row
- 行column
- 列value
- 加える値public void add(Matrix m)
m
- 加える行列public void mul(double value)
value
- 掛けるスカラー値public static Matrix mul(Matrix left, Matrix right)
left
- 左側の行列right
- 右側の行列
public void init()
public static Matrix unitMatrix(int size)
size
- 正方行列の大きさ
public Matrix transposition()
public Vector mul(Vector v)
v
- この行列に右から掛けるベクトル
public Matrix eliminateRowColumn(int row, int column)
row
- 行column
- 列
public Matrix extructRowColumn(int size, int[] rows, int[] columns)
size
- 正方行列の大きさrows
- 行のインデックスを格納した配列columns
- 列のインデックスを格納した配列
public java.lang.Object clone()
Matrix
内の clone
AbstractMatrix
内の clone
|
|||||||||
前のクラス 次のクラス | フレームあり フレームなし | ||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |