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

Method PrintStatus

avida-core/source/main/cOrganism.cc:730–756  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

728
729
730void cOrganism::PrintStatus(ostream& fp)
731{
732 fp << "---------------------------" << endl;
733 fp << "U:" << m_world->GetStats().GetUpdate() << endl;
734 if (m_hardware->GetType() != HARDWARE_TYPE_CPU_GP8) m_hardware->PrintStatus(fp);
735 m_phenotype.PrintStatus(fp);
736 fp << endl;
737
738 fp << setbase(16) << setfill('0');
739
740 fp << "Input (env):";
741 for (int i = 0; i < m_input_buf.GetCapacity(); i++) {
742 int j = i; // temp holder, because GetInputAt self adjusts the input pointer
743 fp << " 0x" << setw(8) << m_interface->GetInputAt(j);
744 }
745 fp << endl;
746
747 fp << "Input (buf):";
748 for (int i = 0; i < m_hardware->GetInputBuf().GetNumStored(); i++) fp << " 0x" << setw(8) << m_hardware->GetInputBuf()[i];
749 fp << endl;
750
751 fp << "Output: ";
752 for (int i = 0; i < m_hardware->GetOutputBuf().GetNumStored(); i++) fp << " 0x" << setw(8) << m_hardware->GetOutputBuf()[i];
753 fp << endl;
754
755 fp << setfill(' ') << setbase(10);
756}
757
758void cOrganism::PrintMiniTraceStatus(cAvidaContext& ctx, ostream & fp)
759{

Callers 1

PrintFinalStatusMethod · 0.45

Calls 6

GetUpdateMethod · 0.80
GetCapacityMethod · 0.80
GetNumStoredMethod · 0.80
GetStatsMethod · 0.45
GetTypeMethod · 0.45
GetInputAtMethod · 0.45

Tested by

no test coverage detected