11#ifndef RGROUPDECOMPGA_H_
12#define RGROUPDECOMPGA_H_
19#include "../../../External/GA/ga/StringChromosome.h"
20#include "../../../External/GA/ga/GaBase.h"
21#include "../../../External/GA/ga/GaOperation.h"
22#include "../../../External/GA/ga/LinkedPopLinearSel.h"
23#include "../../../External/GA/ga/IntegerStringChromosomePolicy.h"
29using namespace GapeGa;
32class RGroupDecompositionChromosome;
34struct RGroupDecompData;
54 this->operationName = operationName;
63 bool isOk() {
return true; }
70 return fingerprintVarianceScoreData;
85 vector<size_t> permutation;
106 const chrono::steady_clock::time_point *
const t0 =
nullptr);
109 return chromosomePolicy;
124 const vector<shared_ptr<GaOperation<RGroupDecompositionChromosome>>>
134 IntegerStringChromosomePolicy chromosomePolicy;
135 int numberOperations;
136 int numberOperationsWithoutImprovement;
138 unsigned int numPermutations;
140 const chrono::steady_clock::time_point *
const t0;
142 void createOperations();
144 static void rGroupMutateOperation(
145 const std::vector<std::shared_ptr<RGroupDecompositionChromosome>>
147 std::vector<std::shared_ptr<RGroupDecompositionChromosome>> &children);
148 static void rGroupCrossoverOperation(
149 const std::vector<std::shared_ptr<RGroupDecompositionChromosome>>
151 std::vector<std::shared_ptr<RGroupDecompositionChromosome>> &children);
const vector< size_t > & getPermutation() const
RGroupDecompositionChromosome(RGroupGa &rGroupGa)
OperationName getOperationName() const
void setOperationName(OperationName operationName)
double getFitness() const
double recalculateScore()
const RGroupGa & getRGroupGA() const
void copyGene(const StringChromosomeBase &other) override
FingerprintVarianceScoreData & getFingerprintVarianceScoreData()
IntegerStringChromosomePolicy & getChromosomePolicy()
vector< GaResult > runBatch()
const RGroupDecompData & getRGroupData() const
int chromosomeLength() const
const vector< shared_ptr< GaOperation< RGroupDecompositionChromosome > > > getOperations() const
int numberDecompositions() const
shared_ptr< RGroupDecompositionChromosome > createChromosome()
RGroupGa(const RGroupDecompData &rGroupData, const chrono::steady_clock::time_point *const t0=nullptr)
GaResult run(int runNumber=1)
unsigned int numberPermutations() const
#define RDKIT_RGROUPDECOMPOSITION_EXPORT
bool rdvalue_is(const RDValue_cast_t)
void copyVarianceData(const FingerprintVarianceScoreData &fromData, FingerprintVarianceScoreData &toData)
void clearVarianceData(FingerprintVarianceScoreData &fingerprintVarianceScoreData)
LinkedPopLinearSel< RGroupDecompositionChromosome, RGroupGa > RGroupGaPopulation
RGroupScorer rGroupScorer
GaResult & operator=(const GaResult &other)
GaResult(const double score, const vector< vector< size_t > > &permutations)
GaResult(const GaResult &other)