MCPcopy Create free account
hub / github.com/devosoft/avida / Modify

Method Modify

avida-core/source/main/cResourceCount.cc:629–638  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

627}
628
629void cResourceCount::Modify(cAvidaContext& ctx, const Apto::Array<double> & res_change)
630{
631 assert(resource_count.GetSize() == res_change.GetSize());
632
633 DoUpdates(ctx);
634 for (int i = 0; i < resource_count.GetSize(); i++) {
635 resource_count[i] += res_change[i];
636 assert(resource_count[i] >= 0.0);
637 }
638}
639
640
641void cResourceCount::Modify(cAvidaContext& ctx, int res_index, double change)

Callers 4

ModifyResourcesMethod · 0.80
UpdateResourcesMethod · 0.80
UpdateResourceMethod · 0.80
AdjustHGTResourceMethod · 0.80

Calls 1

GetSizeMethod · 0.45

Tested by 1

ModifyResourcesMethod · 0.64