関数sequence_power2_summation_smallData マニュアル

(The documentation of function sequence_power2_summation_smallData)

Last Update: 2025/7/22


◆機能・用途(Purpose)

指定した個数のサンプル(絶対値が小さい順)のみを用いて 時系列データのサンプルの値の2乗和を計算する。
Calculate the square summation of the sample values of a time series data using the specified number of smallest absolute values.


◆形式(Format)

#include <sequence/statistics.h>
inline double sequence_power2_summation_smallData
(struct sequence seq,const int N,const int ∗order)


◆引数(Arguments)

seq 計算に用いる時系列データを表す構造体。
A structure to represent the time series data used for the computation.
N 計算に用いるサンプル数。
The number of samples used for the calculation.
order seq.valueの配列要素を絶対値の昇順に並べるための配列要素番号リスト。 seq.valueの配列要素の中で\(m+1\)番目に絶対値が小さい要素が seq.value[order[m]]である。
A list of array component indices to sort the absolute values of the array components of seq.value in an ascending order; seq.value[order[m]] represents the array component of seq.value that has the \(m+1\)th smallest absolute value.


◆戻り値(Return value)

seq.valueの配列要素のうち、絶対値が小さい順にN個の値の2乗和。
The square summation of the smallest N absolute values of the array components of seq.value.


◆使用例(Example)

struct sequence seq;
int ∗order;
double sqsum=sequence_power2_summation_smallData(seq,100,order);