Changeset 1269 for applications/robust

Show
Ignore:
Timestamp:
01/07/11 10:09:42 (13 years ago)
Author:
sindj
Message:

Oprava faktorialu zapornych cisel ve vypoctu integralu v triangulaci. Zbyva opravit nenaplneni podminky v nekterych toprow polyhedronech. JS

Location:
applications/robust
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • applications/robust/main.cpp

    r1268 r1269  
    1313using namespace bdm; 
    1414 
    15 const int emlig_size = 3; 
     15const int emlig_size = 2; 
    1616 
    1717int main ( int argc, char* argv[] ) { 
  • applications/robust/robustlib.cpp

    r1268 r1269  
    1818                                        triangulation.push_back(new_simplex); 
    1919 
    20                                         if(should_integrate) 
     20                                        int condition_order = ((toprow*)this)->condition_order-1; 
     21                                        if(should_integrate && condition_order-my_emlig->number_of_parameters >= 0) 
    2122                                        { 
    2223                                                emlig* current_emlig; 
     
    6768                                                for(map<double,int>::iterator as_ref = as.begin();as_ref!=as.end();as_ref++) 
    6869                                                { 
    69                                                         int condition_order = ((toprow*)this)->condition_order-1; 
    70  
    7170                                                        double multiplier = det_jacobian; 
    7271                                                        if(a_0!=(*as_ref).first) 
     
    10099                                                                } 
    101100 
    102                                                                 double bracket = fact(condition_order-1-number_of_factors)/fact(as1_order-1)/*/pow((*as_ref).first-a_0,condition_order-1-number_of_factors)*/; 
     101                                                                double facti = fact(0); 
     102 
     103                                                                double bracket = fact(condition_order-number_of_factors)/fact(as1_order-1)/pow((*as_ref).first-a_0,condition_order-number_of_factors); 
    103104                                                                for(int k = 0;k < as1_order-1;k++) 
    104105                                                                { 
    105                                                                         double bracket_factor = pow((double)-1,k+1)*fact(condition_order-2-number_of_factors-k)/fact(as1_order-2-k)/pow((*as_ref).first-a_0,condition_order-2-number_of_factors-k); 
     106                                                                        double bracket_factor = pow((double)-1,k+1)*fact(condition_order-1-number_of_factors-k)/fact(as1_order-2-k)/pow((*as_ref).first-a_0,condition_order-1-number_of_factors-k); 
    106107                                                                         
    107108                                                                        for(set<my_ivec>::iterator combi_ref = this->my_emlig->correction_factors[k].begin();combi_ref!=this->my_emlig->correction_factors[k].end();combi_ref++) 
  • applications/robust/robustlib.h

    r1268 r1269  
    960960                                                vec new_coordinates = coordinates1*t+(coordinates2(1,coordinates2.size()-1)-coordinates1);                                       
    961961 
    962                                                 vertex* neutral_vertex = new vertex(new_coordinates); 
    963  
    964                                                 neutral_vertex->my_emlig = this; 
     962                                                vertex* neutral_vertex = new vertex(new_coordinates);                                            
    965963 
    966964                                                new_totally_neutral_child = neutral_vertex; 
     
    968966                                        else 
    969967                                        { 
    970                                                 toprow* neutral_toprow = new toprow(); 
    971  
    972                                                 neutral_toprow->my_emlig = this; 
     968                                                toprow* neutral_toprow = new toprow();                                           
    973969 
    974970                                                new_totally_neutral_child = neutral_toprow; 
    975971                                        } 
     972 
     973                                        new_totally_neutral_child->my_emlig = this; 
    976974                                         
    977975                                        new_totally_neutral_child->children.insert(new_totally_neutral_child->children.end(), 
     
    985983                                                new_totally_neutral_child->vertices.insert((*grand_ref)->vertices.begin(),(*grand_ref)->vertices.end()); 
    986984                                        } 
     985 
     986                                        cout << ((toprow*)current_polyhedron)->condition << endl << toadd << endl; 
    987987 
    988988                                        toprow* positive_poly = new toprow(((toprow*)current_polyhedron)->condition+toadd, ((toprow*)current_polyhedron)->condition_order+1); 
     
    10711071                } 
    10721072 
    1073                  
    1074         } 
    1075  
     1073                /* 
     1074                for(polyhedron* topr_ref = statistic.rows[statistic.size()-1];topr_ref!=statistic.row_ends[statistic.size()-1]->next_poly;topr_ref=topr_ref->next_poly) 
     1075                { 
     1076                        cout << ((toprow*)topr_ref)->condition << endl; 
     1077                } 
     1078                */ 
     1079 
     1080        } 
    10761081 
    10771082        void set_correction_factors(int order)