Show
Ignore:
Timestamp:
05/10/11 18:59:52 (13 years ago)
Author:
sindj
Message:

Jupiijahou, snad se podarilo dobojovat s normalizacnim faktorem. Pridany vsechny potrebne logaritmy do log_nc. JS

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • applications/robust/robustlib.cpp

    r1365 r1366  
    145145                                base_vertex = (*base_ref); 
    146146                         
    147                                 //cout << "Base coords: " << base_vertex->get_coordinates() << endl; 
    148                                 //cout << "Condition: " << as_toprow->condition_sum << endl; 
    149                                 //pause(0.1); 
     147                                /* 
     148                                cout << "Base coords: " << base_vertex->get_coordinates() << endl; 
     149                                cout << "Condition: " << as_toprow->condition_sum << endl; 
     150                                pause(0.1); 
     151                                */ 
    150152 
    151153                                a_0 = -base_vertex->get_coordinates()*cur_condition+as_toprow->condition_sum[0];                 
     
    272274                                }        
    273275 
    274                                 double gamma_multiplier = -(*as_ref).first-a_0; 
    275  
    276                                 double bracket = fact(as1_order-1)/pow(gamma_multiplier,sigma_order+1); 
     276                                double cur_as_ref = (*as_ref).first;                             
     277 
     278                                double gamma_multiplier = -cur_as_ref-a_0; 
     279 
     280                                double bracket = fact(as1_order-1)/pow(gamma_multiplier,sigma_order); 
    277281                                                                 
    278282                                simplex->insert_gamma(0,bracket*multiplier,gamma_multiplier);                                                            
     
    283287                                { 
    284288                                        double local_bracket = 0; 
    285                                         double bracket_factor = 1/fact(as1_order-1-k)/pow(gamma_multiplier,sigma_order-k);//pow((double)-1,k+1) 
     289                                        double bracket_factor = 1/fact(as1_order-1-k)/pow(gamma_multiplier,sigma_order-k-1);//pow((double)-1,k+1) 
    286290                                         
    287291                                        ivec control_vec = ivec(); 
     
    318322                        } 
    319323 
    320                         double correction_term_base = correction_term/pow(-a_0,sigma_order+1); 
     324                        double correction_term_base = correction_term/pow(-a_0,sigma_order); 
    321325 
    322326                        simplex->insert_gamma(0,correction_term_base,-a_0);