org.mklab.tool.matrix
クラス Diff

java.lang.Object
  上位を拡張 org.mklab.tool.matrix.Diff

public class Diff
extends Object

列毎や行毎の差を求めるクラスです。

Difference function for each column

バージョン:
$Revision: 1.10 $
作成者:
koga
関連項目:
Matrix.cumulativeSum()

コンストラクタの概要
Diff()
           
 
メソッドの概要
static Matrix diff(Matrix x)
          もし x がベクトルなら、隣り合う成分の差からなるベクトル [x(2)-x(1) x(3)-x(2) ... x(n)-x(n-1)] を返します。
static Matrix diff(Matrix x, int order)
          order 階差分を求めます。
static Matrix diffColumnWise(Matrix x)
          もし x が行列なら、列毎に差分 diff_col(x) = x(2:n,:) - x(1:n-1,:).
static Matrix diffColumnWise(Matrix x, int order)
          order 階差分を求めます。
static Matrix diffRowWise(Matrix x)
          もし x が行列なら、行毎に差分 diff_row(x) = x(:,2:n) - x(:,1:n-1).
static Matrix diffRowWise(Matrix x, int order)
          order 階差分を求めます。
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

Diff

public Diff()
メソッドの詳細

diff

public static Matrix diff(Matrix x)
もし x がベクトルなら、隣り合う成分の差からなるベクトル [x(2)-x(1) x(3)-x(2) ... x(n)-x(n-1)] を返します。

パラメータ:
x - データ
戻り値:
差分 (difference)

diff

public static Matrix diff(Matrix x,
                          int order)
order 階差分を求めます。

パラメータ:
x - データ
order - 階数
戻り値:
差分 (difference)

diffColumnWise

public static Matrix diffColumnWise(Matrix x)
もし x が行列なら、列毎に差分

 
 diff_col(x) = x(2:n,:) - x(1:n-1,:).
 
 
を求めます。

パラメータ:
x - データ
戻り値:
差分 (difference)

diffColumnWise

public static Matrix diffColumnWise(Matrix x,
                                    int order)
order 階差分を求めます。

パラメータ:
x - 対象となる行列
order - 階数
戻り値:
差分 (difference)

diffRowWise

public static Matrix diffRowWise(Matrix x)
もし x が行列なら、行毎に差分

 
 diff_row(x) = x(:,2:n) - x(:,1:n-1).
 
 
を計算します。

パラメータ:
x - データ
戻り値:
差分 (difference)

diffRowWise

public static Matrix diffRowWise(Matrix x,
                                 int order)
order 階差分を求めます。

パラメータ:
x - データ
order - 階数
戻り値:
差分 (difference)