Check if the individualList is initialized.
| 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) { |
nothing calls this directly
no outgoing calls
no test coverage detected