29 {
30
31 bool dirty = false;
32
33
34
35 dirty = dirty || curveTimes.size() !=
curveTimes_.size();
36 dirty = dirty || curveData.size() !=
curveData_.size();
38 dirty = dirty || volData.size() !=
volData_.size();
39
40 for (Size i = 0; i < curveTimes.size() && !dirty; ++i) {
41 dirty = dirty || (curveTimes[i].size() !=
curveTimes_[i].size());
42 for (Size j = 0; j < curveTimes[i].size() && !dirty; ++j) {
43 dirty = dirty || curveTimes[i][j] !=
curveTimes_[i][j];
44 }
45 }
46
47 for (Size i = 0; i < curveData.size() && !dirty; ++i) {
48 dirty = dirty || (curveData[i].size() !=
curveData_[i].size());
49 for (Size j = 0; j < curveData[i].size() && !dirty; ++j) {
50 dirty = dirty || curveData[i][j] !=
curveData_[i][j];
51 }
52 }
53
54 for (Size i = 0; i < volTimesStrikes.size() && !dirty; ++i) {
56 for (Size j = 0; j < volTimesStrikes[i].size() && !dirty; ++j) {
57 dirty = dirty || volTimesStrikes[i][j].first !=
volTimesStrikes_[i][j].first;
58 dirty = dirty || volTimesStrikes[i][j].second !=
volTimesStrikes_[i][j].second;
59 }
60 }
61
62 for (Size i = 0; i < volData.size() && !dirty; ++i) {
63 dirty = dirty || (volData[i].size() !=
volData_[i].size());
64 for (Size j = 0; j < volData[i].size() && !dirty; ++j) {
65 dirty = dirty || volData[i][j] !=
volData_[i][j];
66 }
67 }
68
69
70
71 if (dirty && updateCache) {
76 }
77
78 return dirty;
79}
std::vector< std::vector< Real > > curveTimes_
std::vector< std::vector< std::pair< Real, Real > > > volTimesStrikes_
std::vector< std::vector< Real > > curveData_
std::vector< std::vector< Real > > volData_