MCPcopy Create free account
hub / github.com/RootHarold/Lycoris / checkFirstRun

Method checkFirstRun

LycorisNet/sources/lycoris.cpp:725–740  ·  view source on GitHub ↗

Check if the individualList is initialized.

Source from the content-addressed store, hash-verified

723
724 // Check if the individualList is initialized.
725 void Lycoris::checkFirstRun() {
726 if (args->firstRun) {
727 args->firstRun = false;
728
729 auto initialCapacity = uint32_t(float(capacity) / (1 + args->mutateOdds));
730 if (initialCapacity == 0) {
731 initialCapacity = 1;
732 }
733
734 individualList = new std::vector<Individual *>(initialCapacity);
735 for (uint32_t i = 0; i < initialCapacity; ++i) {
736 (*individualList)[i] = new Individual(inputNum, outputNum, args);
737 }
738 best = (*individualList)[0];
739 }
740 }
741
742 // Import the pre-trained model.
743 Lycoris *loadModel(const std::string &path, uint32_t capacity) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected