Пример #1
0
 std::vector<double> FragilityFn::pExceeded(double edp)
 {
     std::vector<double> result(n_states());
     for (size_t i=0; i < n_states(); i++) {
         result[i] = damage_states[i].p_at_most(edp);
     }
     return result;
 }
Пример #2
0
 std::vector<double> FragilityFn::pHighest(double edp)
 {
     std::vector<double> result = pExceeded(edp);
     for (size_t i=1; i < n_states(); i++) {
         result[i-1] -= result[i];
     }
     return result;
 }
Пример #3
0
 State::State(const std::string& name)
   : id_(n_states()), name_(name) { 
   states_by_name_[name] = this;
   states_by_id_.push_back(this);
 }