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

Method ClassifyNewUnit

avida-core/source/systematics/Manager.cc:49–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47}
48
49void Avida::Systematics::Manager::ClassifyNewUnit(UnitPtr u, const RoleClassificationHints* role_hints)
50{
51 for (int i = 0; i < m_arbiters.GetSize(); i++) {
52 const ClassificationHints* hints = NULL;
53 if (role_hints && role_hints->Has(m_arbiters[i]->Role())) hints = &(role_hints->Get(m_arbiters[i]->Role()));
54 GroupPtr g = m_arbiters[i]->ClassifyNewUnit(u, hints);
55 if (g) u->AddClassification(g);
56 }
57}
58bool Avida::Systematics::Manager::AttachTo(World* world)
59{
60 WorldFacetPtr ptr(this);

Callers

nothing calls this directly

Calls 5

AddClassificationMethod · 0.80
GetSizeMethod · 0.45
HasMethod · 0.45
RoleMethod · 0.45
GetMethod · 0.45

Tested by

no test coverage detected