9 std::vector<double> CollThick, CollValue;
10 const unsigned int size = Thickness.size();
11 if (size != ParmValue.size())
13 "Cannot collapse model with differing number of depths and parameter values !");
14 unsigned int index = 0;
15 for (; index < size - 1; ++index)
20 if ((fcmp(ParmValue(index), ParmValue(index + 1),
21 std::numeric_limits<double>::epsilon()) == 0) && ((Thickness(index) + Thickness(index
24 CollValue.push_back(ParmValue(index));
25 CollThick.push_back(Thickness(index) + Thickness(index + 1));
30 CollThick.push_back(Thickness(index));
31 CollValue.push_back(ParmValue(index));
34 if (index == size - 1)
36 CollThick.push_back(Thickness(index));
37 CollValue.push_back(ParmValue(index));
39 Thickness.resize(CollThick.size());
40 ParmValue.resize(CollValue.size());
41 copy(CollThick.begin(), CollThick.end(), Thickness.begin());
42 copy(CollValue.begin(), CollValue.end(), ParmValue.begin());
ublas::vector< double > ttranscribed
void CollapseModel(ttranscribed &Thickness, ttranscribed &ParmValue)
Remove layers with identical parameters from the model and collapse them into a single layer each...
The basic exception class for all errors that arise in gplib.