int main() { double Delta_i, Delta_f, Ui; double* S; Delta_i=0.02; Delta_f=0.015; g_Ns=g_N*g_N; init_WK(); S=(double*)malloc(sizeof(double)*3*g_dim); //firt we should get g_Uf. g_Delta=Delta_f; g_Uf=init_S(S); //then initalize S using the same function g_Delta=Delta_i; Ui=init_S(S); printf("Delta_i=%lf U_i=%lf Delta_f=%lf U_f=%lf\n",Delta_i,Ui,Delta_f,g_Uf); evolution(S); printf("Delta_i=%lf U_i=%lf Delta_f=%lf U_f=%lf\n",Delta_i,Ui,Delta_f,g_Uf); free(S); free(g_WK); return 0; }
int main() { double Delta_i; double* S; Delta_i=0.5; g_Ns=g_N*g_N; g_dim=dim_of_k(); K=(double*)malloc(sizeof(double)*2*g_dim); init_K(K); S=(double*)malloc(sizeof(double)*3*g_dim); g_Delta=Delta_i; g_Uf=init_S(S); printf("Delta_i=%lf g_U=%lf",Delta_i,g_Uf); evolution(S); printf("Delta_i=%lf g_U=%lf",Delta_i,g_Uf); free(S); free(K); return 0; }
void Sample_state_filter::init_sample (const FM::ColMatrix& initS) /* Initialise from a sampling */ { S = initS; init_S(); }
int main() { double Delta_i, Delta_f, Ui; double* S; double* K; Delta_i=0.8; Delta_f=0.5; g_Ns=g_N*g_N; g_dim=dim_of_k(); printf("%ld\n",g_dim); K=(double*)malloc(sizeof(double)*2*g_dim); init_K(K); S=(double*)malloc(sizeof(double)*3*g_dim); //firt we should get g_Uf. g_Delta=Delta_f; g_Uf=init_S(S,K); //then initalize S using the same function g_Delta=Delta_i; Ui=init_S(S,K); printf("Delta_i=%lf U_i=%lf Delta_f=%lf U_f=%lf\n",Delta_i,Ui,Delta_f,g_Uf); // S=(double*)malloc(sizeof(double)*3*g_Ns); // //firt we should get g_Uf. // g_Delta=Delta_f; // g_Uf=init_S(S); // //then initalize S using the same function // g_Delta=Delta_i; // Ui=init_S(S); // // printf("Delta_i=%lf U_i=%lf Delta_f=%lf U_f=%lf\n",Delta_i,Ui,Delta_f,g_Uf); // // // printf("Delta_i=%lf U_i=%lf Delta_f=%lf U_f=%lf\n",Delta_i,Ui,Delta_f,g_Uf); // free(S); return 0; }
void init_rng(char* fname) { //cout << "RNG initialization" << endl; time_t t = time(NULL); char* keyword = new char[3]; strcpy(keyword, "RNG"); K = gen_key(keyword); //long l_S = 0x1122334455667788; //copy_bytes((char*)&l_S, S); init_S(fname); cout << "S = "; print_hex(S, BLOCK_SIZE); cout << endl; put_timestamp(D); cout << "D = "; print_hex(D, BLOCK_SIZE); cout << endl; I = cipher(D, BLOCK_SIZE, K); // I = f(D, K) cout << "I = "; print_hex(I, BLOCK_SIZE); cout << endl << endl; }