MCPcopy Create free account
hub / github.com/GeoDaCenter/geoda / UpdateGlobalTime

Method UpdateGlobalTime

VarTools.cpp:246–262  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

244}
245
246void Manager::UpdateGlobalTime(int tm)
247{
248 global_time = tm;
249 int delta = 0;
250 if (global_time < MinTmForAllSynced()) {
251 delta = global_time - MinTmForAllSynced();
252 } else if (global_time > MaxTmForAllSynced()) {
253 delta = global_time - MaxTmForAllSynced();
254 }
255 if (delta != 0) {
256 for (size_t i=0, sz=vars.size(); i<sz; ++i) {
257 if (vars[i].sync_with_global_time && vars[i].is_time_variant) {
258 vars[i].time += delta;
259 }
260 }
261 }
262}
263
264int Manager::GetLastGlobalTime()
265{

Callers 3

updateMethod · 0.80
updateMethod · 0.80
updateMethod · 0.80

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected