Show
Ignore:
Timestamp:
12/13/10 19:25:45 (14 years ago)
Author:
sindj
Message:

Dodelavani korekcnich faktoru pri stjene hodnote funkce ve dvou bodech polyhedronu. Rozdelano. JS

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • applications/robust/robustlib.h

    r1254 r1262  
    1212#include <vector> 
    1313#include <list> 
     14#include <map> 
    1415#include <set> 
    1516#include <algorithm> 
     17#include <string> 
    1618         
    1719using namespace bdm; 
     
    413415class emlig // : eEF 
    414416{ 
     417        vector<set<ivec>> correction_factors; 
    415418 
    416419        /// A statistic in a form of a Hasse diagram representing a complex of convex polyhedrons obtained as a result 
     
    425428 
    426429        double normalization_factor; 
     430 
     431         
    427432 
    428433        void alter_toprow_conditions(vec condition, bool should_be_added) 
     
    915920                        sizevector.push_back(statistic.row_size(s)); 
    916921                }*/ 
    917         } 
     922 
     923                 
     924        } 
     925 
     926        vector<list<ivec>> get_correction_factors(int order) 
     927                { 
     928                        for(int remaining_order = correction_factors.size();remaining_order>order;remaining_order++) 
     929                        { 
     930                                set<ivec> factor_templates; 
     931                                set<ivec> final_factors; 
     932 
     933                                for(int i = 1;i==number_of_parameters-order+1;i++) 
     934                                { 
     935                                        for(int j = 1;j==remaining_order;j++) 
     936                                        { 
     937                                                factor_templates.insert(zeros(number_of_parameters-order+2)); 
     938 
     939                                                for(set<ivec>::iterator fac_ref = factor_templates.begin();fac_ref!=factor_templates.end();fac_ref++) 
     940                                                { 
     941                                                        ivec current_template = (*fac_ref); 
     942 
     943                                                        current_template[0]+=1; 
     944                                                        current_template[i]+=1; 
     945 
     946                                                        if(current_template[0]==remaining_order) 
     947                                                        { 
     948                                                                final_factors.insert(current_template.right(current_template.size()-1); 
     949                                                        } 
     950                                                        else 
     951                                                        { 
     952                                                                factor_templates.insert(current_template); 
     953                                                        } 
     954                                                }                                        
     955                                        } 
     956                                }        
     957 
     958                                correction_factors.push_back(final_factors); 
     959 
     960                        } 
     961                } 
    918962 
    919963protected: 
     
    12341278 
    12351279 
     1280 
    12361281#endif //TRAGE_H