Skip to content
Snippets Groups Projects
Commit e79732b5 authored by Saad Jbabdi's avatar Saad Jbabdi
Browse files

updates for Jill

parent 855016b0
No related branches found
No related tags found
No related merge requests found
......@@ -748,36 +748,36 @@ namespace FIBRE{
void jump( bool can_use_ard=true ){
if(!propose_d()){
compute_prior();
compute_likelihood();
compute_energy();
if(test_energy()){
accept_d();
}
else{
reject_d();
restore_energy();
}
}
else{
reject_d();
}
/* if(!propose_d()){ */
/* compute_prior(); */
/* compute_likelihood(); */
/* compute_energy(); */
/* if(test_energy()){ */
/* accept_d(); */
/* } */
/* else{ */
/* reject_d(); */
/* restore_energy(); */
/* } */
/* } */
/* else{ */
/* reject_d(); */
/* } */
if(!propose_S0()){
compute_prior();
compute_likelihood();
compute_energy();
if(test_energy())
accept_S0();
else{
reject_S0();
restore_energy();
}
}
else{
reject_S0();
}
/* if(!propose_S0()){ */
/* compute_prior(); */
/* compute_likelihood(); */
/* compute_energy(); */
/* if(test_energy()) */
/* accept_S0(); */
/* else{ */
/* reject_S0(); */
/* restore_energy(); */
/* } */
/* } */
/* else{ */
/* reject_S0(); */
/* } */
for(unsigned int f=0;f<m_fibres.size();f++){
//cout<<"pre th"<<m_fibres[f].get_th()<<endl;
......
......@@ -104,7 +104,7 @@ namespace TRACTVOLSX{
ColumnVector sample(const float& x,const float& y,const float&z,const float& r_x,const float& r_y,const float& r_z,
float& prefer_x=0,float& prefer_y=0,float& prefer_z=0){
float& prefer_x,float& prefer_y,float& prefer_z){
////////Probabilistic interpolation
int cx =(int) ceil(x),fx=(int) floor(x);
......@@ -161,7 +161,7 @@ namespace TRACTVOLSX{
init_sample=false;
}
else{
if(fabs(prefer_x)+fabs(prefer_y)+fabs(prefer_z)==0){
if((fabs(prefer_x)+fabs(prefer_y)+fabs(prefer_z))==0){
prefer_x=r_x;prefer_y=r_y;prefer_z=r_z;
}
for(unsigned int fib=0;fib<thsamples.size();fib++){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment