var searchIndex = {}; searchIndex["rsgenetic"] = {"doc":"# RsGenetic","items":[[0,"pheno","rsgenetic","Contains the definition of a Phenotype.",null,null],[8,"Phenotype","rsgenetic::pheno","Defines what a Phenotype is.\nA Phenotype can breed with other Phenotypes, resulting in a single child.\nA Phenotype can also be mutated.\nFinally, a Phenotype has a certain fitness value associated with it.",null,null],[10,"fitness","","Calculate the fitness of this Phenotype.",0,null],[10,"crossover","","Perform crossover on this Phenotype, returning a new Phenotype.",0,null],[10,"mutate","","Perform mutation on this Phenotype, returning a new Phenotype.",0,null],[0,"sim","rsgenetic","Contains implementations of Simulators, which can run genetic algorithms.",null,null],[4,"SelectionType","rsgenetic::sim","The type of parent selection.",null,null],[13,"Maximize","","Select only the `count * 2` best performing parents in terms of fitness.",1,null],[12,"count","rsgenetic::sim::SelectionType","Should be larger than 0 and smaller than half the population size.",1,null],[13,"Tournament","rsgenetic::sim","Perform tournament selection with tournament size `count`, running `num` tournaments.\nThis yields `num * 2` parents.",1,null],[12,"num","rsgenetic::sim::SelectionType","Indicates the number of tournaments. Should be larger than 0 and smaller than the\npopulation size.",1,null],[12,"count","","Should be larger than 0 and smaller than the population size.",1,null],[13,"Stochastic","rsgenetic::sim","Perform Stochastic Universal Sampling to do the selection.\nSelects `count` parents.",1,null],[12,"count","rsgenetic::sim::SelectionType","Should be larger than 0 and smaller than the population size.",1,null],[13,"Roulette","rsgenetic::sim","Perform Roulette Wheel Selection, also known as Fitness Proportionate Selection.\nThis yields `count` parents.",1,null],[12,"count","rsgenetic::sim::SelectionType","Should be larger than 0 and smaller than the population size.",1,null],[4,"FitnessType","rsgenetic::sim","Whether to maximize or to minimize the fitness value.",null,null],[13,"Maximize","","The `Simulation` will try to increase the fitness value of phenotypes.",2,null],[13,"Minimize","","The `Simulation` will try to decrease the fitness value of phenotypes.",2,null],[0,"seq","","Contains a sequential implementation of `::sim::Simulation`,\ncalled a `Simulator`.",null,null],[3,"Simulator","rsgenetic::sim::seq","A sequential implementation of `::sim::Simulation`.\nThe genetic algorithm is run in a single thread.",null,null],[3,"SimulatorBuilder","","A `Builder` for the `Simulator` type.",null,null],[11,"builder","","Create builder.",3,{"inputs":[{"name":"vec"}],"output":{"name":"simulatorbuilder"}}],[11,"run","","Run.",3,null],[11,"iterations","","",3,null],[11,"time","","",3,null],[11,"set_max_iters","","Set the maximum number of iterations of the resulting `Simulator`.",4,null],[11,"set_selection_type","","Set the selection type of the resulting `Simulator`.",4,null],[11,"set_fitness_type","","Set the fitness type of the resulting `Simulator`,\ndetermining whether the `Simulator` will try to maximize\nor minimize the fitness values of `Phenotype`s.",4,null],[11,"set_early_stop","","Set early stopping. If for `n_iters` iterations, the change in the highest fitness\nis smaller than `delta`, the simulator will stop running.",4,null],[11,"build","","",4,null],[6,"NanoSecond","rsgenetic::sim","Simulation run time is defined in nanoseconds.",null,null],[8,"Builder","","A `Builder` can create new instances of an object.\nFor this library, only `Simulation` objects use this `Builder`.",null,null],[10,"build","","Return the result.",5,null],[8,"Simulation","","A `Simulation` is an execution of a genetic algorithm.",null,null],[16,"B","","",6,null],[10,"builder","","Create a `Builder` to create an instance.\nBecause the population is a required parameter, you have to pass it here,\ninstead of using a builder function.",6,{"inputs":[{"name":"vec"}],"output":{"name":"b"}}],[10,"run","","Run the simulation. Returns the best phenotype\nor a string containing an error if something went wrong.",6,null],[10,"time","","Get the number of nanoseconds spent running, or `None` in case of an overflow,\nor if the simulation wasn't run yet.",6,null],[10,"iterations","","Get the number of iterations the `Simulator` needed to converge.",6,null]],"paths":[[8,"Phenotype"],[4,"SelectionType"],[4,"FitnessType"],[3,"Simulator"],[3,"SimulatorBuilder"],[8,"Builder"],[8,"Simulation"]]}; initSearch(searchIndex);