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,"StepResult","rsgenetic::sim","The result of running a single step.",null,null],[13,"Success","","The step was successful, but the simulation has not finished.",1,null],[13,"Failure","","The step was not successful.",1,null],[13,"Done","","The step was successful and the simulation finished.",1,null],[4,"RunResult","","The result of running an entire simulation.",null,null],[13,"Failure","","An error occurred somewhere during simulation.",2,null],[13,"Done","","The simulation finished without errors.",2,null],[4,"FitnessType","","Whether to maximize or to minimize the fitness value.",null,null],[13,"Maximize","","The `Simulation` will try to increase the fitness value of phenotypes.",3,null],[13,"Minimize","","The `Simulation` will try to decrease the fitness value of phenotypes.",3,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.",4,{"inputs":[],"output":{"name":"simulatorbuilder"}}],[11,"step","","",4,null],[11,"run","","Run.",4,null],[11,"get","","",4,null],[11,"iterations","","",4,null],[11,"time","","",4,null],[11,"set_population","","Set the population of the resulting `Simulator`.",5,null],[11,"set_selector","","Set the selector of the resulting `Simulator`.",5,null],[11,"set_max_iters","","Set the maximum number of iterations of the resulting `Simulator`.",5,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.",5,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.",5,null],[11,"build","","",5,null],[0,"select","rsgenetic::sim","The selection module provides a trait that can be implemented\nto implement new selection algorithms. This module also provides a couple\nof useful selection algorithms.",null,null],[3,"MaximizeSelector","rsgenetic::sim::select","Selects best performing phenotypes from the population.",null,null],[3,"TournamentSelector","","Runs several tournaments, and selects best performing phenotypes from each tournament.",null,null],[3,"StochasticSelector","","Selects phenotypes at random, starting from a random index and taking equidistant jumps.",null,null],[3,"RouletteSelector","","Selects phenotypes with a probability based on their fitness value.",null,null],[11,"new","","Create and return a maximizing selector.",6,{"inputs":[{"name":"usize"}],"output":{"name":"maximizeselector"}}],[11,"select","","",6,null],[11,"new","","Create and return a tournament selector.",7,{"inputs":[{"name":"usize"},{"name":"usize"}],"output":{"name":"tournamentselector"}}],[11,"select","","",7,null],[11,"new","","Create and return a stochastic selector.",8,{"inputs":[{"name":"usize"}],"output":{"name":"stochasticselector"}}],[11,"select","","",8,null],[11,"new","","Create and return a roulette selector.",9,{"inputs":[{"name":"usize"}],"output":{"name":"rouletteselector"}}],[11,"select","","",9,null],[6,"Parents","","`Parents` come in a `Vec` of two `T`'s.",null,null],[8,"Selector","","A `Selector` can select `Parents` for a new iteration of a `Simulation`.",null,null],[10,"select","","Select elements from a `population`, either maximizing or minimizing the fitness\n(`fitness_type`).",10,null],[6,"NanoSecond","rsgenetic::sim","Simulation run time is defined in nanoseconds.",null,null],[6,"SimResult","","The result of a simulation, containing the best phenotype\nor an error message.",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.",11,null],[8,"Simulation","","A `Simulation` is an execution of a genetic algorithm.",null,null],[16,"B","","A `Builder` is used to create instances of a `Simulation`.",12,null],[10,"builder","","Create a `Builder` to create an instance.",12,{"inputs":[],"output":{"name":"b"}}],[10,"run","","Run the simulation completely.",12,null],[10,"step","","Make one step in the simulation. This function returns a `StepResult`:",12,null],[10,"get","","Get the result of the latest step or of a complete run.",12,null],[10,"time","","Get the number of nanoseconds spent running, or `None` in case of an overflow.",12,null],[10,"iterations","","Get the number of iterations the `Simulator` has executed so far.",12,null],[11,"fmt","","",1,null],[11,"eq","","",1,null],[11,"fmt","","",2,null],[11,"eq","","",2,null],[11,"clone","","",3,null]],"paths":[[8,"Phenotype"],[4,"StepResult"],[4,"RunResult"],[4,"FitnessType"],[3,"Simulator"],[3,"SimulatorBuilder"],[3,"MaximizeSelector"],[3,"TournamentSelector"],[3,"StochasticSelector"],[3,"RouletteSelector"],[8,"Selector"],[8,"Builder"],[8,"Simulation"]]}; initSearch(searchIndex);