SEO [PR] 爆速!無料ブログ 無料ホームページ開設 無料ライブ放送
メインページ   名前空間一覧   クラス階層   構成   ファイル一覧   名前空間メンバ   構成メンバ   ファイルメンバ  

名前空間 dkutil::math の解説


構成

class  dKingyoRandom_ANSI
class  dKingyoRandom_ANSI_EX
class  dKingyoRandom_Float
class  dKingyoRandom_Float_EX
class  dKingyoRandom_MT
class  dKingyoRandom_MT_EX
class  dKingyoRandom_MT_SSE2
class  dKingyoRandom_MT_SSE2_EX
class  Double
class  INL_dKingyoRandom_MT_SSE2

関数

template<typename SEED> int arg_rand (SEED *seed)
void RandomTest ()
void MTRandomTest ()
void srandMT (unsigned long seed)
unsigned long CheckMMX (void)
void MMX_generateMT (void)
void generateMT (void)
unsigned long randMT (void)
int CreateArthimeticProgression (int *array, DWORD num, int a, int d)
int CreateGeometricProgression (int *array, DWORD num, int a, int r)
int CreateRandomNumberProgression (int *array, DWORD num, int min, int max, int(*rand_func_callback)(int min_, int max_))
DINLINE short GetAngle (int mx, int my, int sx, int sy)
 二つの2次元座標から角度を求める。 ちなみに256度とかUSHORT_MAX度とかは算出できないと思います。

double kai2 (double o1, double o2, double e1, double e2)
 カイ二乗検定らしい

float kai2 (float o1, float o2, float e1, float e2)
std::ostream & operator<< (std::ostream &stream, const Double &d)
std::istream & operator>> (std::istream &stream, Double &dbl)
const Double operator+ (const Double &left, const Double &right)
const Double operator- (const Double &left, const Double &right)
const Double operator * (const Double &left, const Double &right)
const Double operator/ (const Double &left, const Double &right)
bool operator== (const Double &left, const Double &right)
bool operator== (const Double &left, double right)
bool operator== (double &left, const Double &right)
bool operator!= (const Double &left, const Double &right)
bool operator!= (const Double &left, double right)
bool operator!= (double left, const Double &right)


関数の解説

template<typename SEED>
int arg_rand SEED *  seed  )  [inline]
 

unsigned long dkutil::math::CheckMMX void   ) 
 

int dkutil::math::CreateArthimeticProgression int *  array,
DWORD  num,
int  a,
int  d
 

-1

int dkutil::math::CreateGeometricProgression int *  array,
DWORD  num,
int  a,
int  r
 

等比数列
A Geometric Series
実装してから思った…テンプレートにすれば良かった(爆)
調和数列も似たようなものだから削除。どうせ使わない。数列関連ってお遊び関数だし…

引数:
array [out] = 配列のポインタを代入
num [in] = 配列の数
a [in] = 初項
r [in] = 公比
戻り値:
最後の配列の中身

int dkutil::math::CreateRandomNumberProgression int *  array,
DWORD  num,
int  min,
int  max,
int(*  rand_func_callback)(int min_, int max_)
 

乱数列 A Random Number Series
どうせ誰も使わないと思うが乱数列を作成補助するやつ
引数の左はmin右がmax…ってかmin<=x<=maxまでを返す関数のポインタをぶち込む。

引数:
array [out] = 配列のポインタを代入
num [in] = 配列の数
min [in] = 乱数の最小値
max [in] = 乱数の最大値
rand_func_callback[in] = ランダム変域を返す関数。
戻り値:
最後の配列の中身

void dkutil::math::generateMT void   ) 
 

DINLINE short GetAngle int  mx,
int  my,
int  sx,
int  sy
 

二つの2次元座標から角度を求める。 ちなみに256度とかUSHORT_MAX度とかは算出できないと思います。

float dkutil::math::kai2 float  o1,
float  o2,
float  e1,
float  e2
[inline]
 

double dkutil::math::kai2 double  o1,
double  o2,
double  e1,
double  e2
[inline]
 

カイ二乗検定らしい

参考文章

カイ二乗分布のパーセント点を求める。 χ2 =  (Oy−Ey)2/Ey+(Og−Eg)2/Eg. χ2 =  Σ(Oi−Ei)2/Ei 危険率を1%に下げるにはカイ二乗の値が6.63以上かを調べればよい。 まだ、実験段階中なので使わないでください〜〜〜

void MMX_generateMT void   ) 
 

void MTRandomTest  )  [inline]
 

const Double operator * const Double left,
const Double right
 

bool operator!= double  left,
const Double right
 

bool operator!= const Double left,
double  right
 

bool operator!= const Double left,
const Double right
 

const Double operator+ const Double left,
const Double right
 

const Double operator- const Double left,
const Double right
 

const Double operator/ const Double left,
const Double right
 

std::ostream& operator<< std::ostream &  stream,
const Double d
 

bool operator== double &  left,
const Double right
 

bool operator== const Double left,
double  right
 

bool operator== const Double left,
const Double right
 

std::istream& operator>> std::istream &  stream,
Double dbl
 

unsigned long dkutil::math::randMT void   ) 
 

void RandomTest  )  [inline]
 

void dkutil::math::srandMT unsigned long  seed  ) 
 


dKingyoUtilClass (dkutil)に対してMon Jun 9 01:33:33 2003に生成されました。 doxygen1.3