#include #include #include //================================================================C void DRMAT(double *A, double *B, int N, int ND, int IDA, int IDB, double SIG) //================================================================C // Real-Dense Matrix Generator C //----------------------------------------------------------------C // A(ND*N) R*8, Out, Output Matrix A C // B(N) R*8, Out, Output Right Vector B C // N I*4, In, Matrix Order of A C // ND I*4, In, Array Size of A ( ND >= N ) C // IDA I*4, In, Identify of Matrix A C // IDA=0 ; Diag=1+Sig, Nondiag=1 C // IDA=1 ; Randum number C // IDB I*4, In, Identify of right Vector B C // IDB=0 ; Set x=1 C // SIG R*8, In, Value of Generation C //----------------------------------------------------------------C // Written by Yasunori Ushiro , 2007/05/30 C // ( Tokyo Polytechnic University ) C // 後 保範(東京工芸大学) C // Address is equal to Fortran Version C //================================================================C { int i, j, IRAND; double V; // Set Matrix A V = 32767.0 ; if(IDA == 1) { IRAND = fabs(SIG)*V ; srand(IRAND) ; for (j=0; j