var searchIndex = {}; searchIndex["darwin_rs"] = {"doc":"darwin-rs: evolutionary algorithms with Rust","items":[[3,"Simulation","darwin_rs","The `Simulation` type. Contains all the information / configuration for the simulation to run.",null,null],[12,"type_of_simulation","","How should the simulation stop ?",0,null],[12,"num_of_individuals","","The number of individuals for the whole simulation.",0,null],[12,"num_of_threads","","The number of threads to use to speed up calculation.",0,null],[12,"improvement_factor","","The current improvement factor, that means the ration between the first and the current fittness.",0,null],[12,"original_fittness","","The very first calculated fittness, when the simulation just started.",0,null],[12,"fittest","","The current fittest individual. This will change during the simulation as soon as a new more fittest individual is found",0,null],[12,"population","","The population for the simulation. Contains all individuals for the simulation.",0,null],[12,"total_time_in_ms","","The total run time for the simulation. This will be calculated once the stimulation has finished.",0,null],[12,"iteration_counter","","The number of current iteration. This changes with every iteration and is used by the `EndIteration` enum.",0,null],[12,"reset_limit","","The amount of iteration to wait until individuals will be resetted.",0,null],[12,"reset_counter","","The reset counter, if reset_counter >= reset_limit, all the individuals are discarded and the\nsimulation restarts anew with an increased reset_limit",0,null],[12,"output_new_fittest","","A flag that specifies if the sumulation should write a message every time a new most fittest individual is found.",0,null],[12,"pool","","The thread pool used by the `jobsteal` crate",0,null],[3,"IndividualWrapper","","A wrapper helper struct for the individuals.\nIt does the book keeping of the fittness and the number of mutations this individual\nhas to run in one iteration.",null,null],[12,"individual","","The actual individual, user defined struct.",1,null],[3,"SimulationBuilder","","This is a helper struct in order to build (configure) a valid simulation.\nSee builder pattern: https://en.wikipedia.org/wiki/Builder_pattern",null,null],[4,"SimulationType","","The `SimulationType` type. Speficies the criteria on how a simulation should stop.",null,null],[13,"EndIteration","","Finish the simulation when a number of iteration has been reached.",2,null],[13,"EndFittness","","Finish the simulation when a specific fittness is rached.\nThat means if at least one of the individuals has this fittness.\nThe fittness is calculated using the implemented `calculate_fittness` functions\nof the `Individual` trait",2,null],[13,"EndFactor","","Finish the simulation when a specific improvement factor is reached.\nThat means the relation between the very first fittness and the current fittness of the fittest individual",2,null],[4,"BuilderResult","","This enum describes the possible return error that the simulation builder can return.",null,null],[13,"TooLowEndIterration","","The number of iteration is too low, should be >= 10",3,null],[13,"TooLowIndividuals","","The number of individuals is too loe, should be >= 3",3,null],[13,"Ok","","Everything is fine, the simulation is properly configured and ready to run.",3,null],[8,"Individual","","This trait has to be implemented for the user defined struct.",null,null],[10,"new","","This method creates a new individual.",4,{"inputs":[],"output":{"name":"self"}}],[10,"mutate","","This method mutates the individual. Usually this is a cheap and easy to implement function.\nIn order to improve the simulation, the user can make this function a bit "smarter".\nThis is nicely shown in the tsp and tsp2 example. The tsp2 example contains two types of mutation,\ntsp just one:",4,null],[10,"calculate_fittness","","This method calculates the fittness for the individual. Usually this is an expensive operation and\na bit more difficult to implement, compared to the mutation method above.\nThe lower the fittness value, the better (healthier) the individual is and the closer the individual is to the\nperfect solution. This can also correspont to the number of errors like for example in the sudoku or queens problem case.",4,null],[11,"clone","","",2,null],[11,"fmt","","",2,null],[11,"run","","This actually runs the simulation.\nDepending on the type of simulation (EndIteration, EndFactor or EndFittness) the iteration loop will check for The\nstop condition accordingly.",0,null],[11,"print_fittness","","This is a helper function that the user can call after the simulation stops in order to see\nall the fittness values for all the individuals.",0,null],[11,"clone","","",1,null],[11,"fmt","","",1,null],[11,"eq","","",1,null],[11,"cmp","","",1,null],[11,"partial_cmp","","",1,null],[11,"new","","Start with this method, it must always be called as the first one.\nIt creates a default simulation with some dummy (but invalid) values.",5,{"inputs":[],"output":{"name":"simulationbuilder"}}],[11,"iterations","","Set the total number of iterations for the simulation and thus sets the simulation type to `EndIteration`.\n(Only usefull in combination with `EndIteration`).",5,null],[11,"factor","","Set the improvement factor stop criteria for the simulation and thus sets the simulation type to `EndFactor`.\n(Only usefull in combination with `EndFactor`).",5,null],[11,"fittness","","Set the minimum fittness stop criteria for the simulation and thus sets the simulation type to `EndFittness`.\n(Only usefull in combination with `EndFactor`).",5,null],[11,"individuals","","Sets the number of individuals and creates the population, must be >= 3",5,null],[11,"threads","","Sets the number of threads in order to speed up the simulation.",5,null],[11,"output_new_fittest","","Sets a flag if the simulation should write a message whenever a new fittest individual is found.",5,null],[11,"increasing_mutation_rate","","Configures the mutation rates (number of mutation runs) for all the individuals in the sumulation:\nThe first individual will mutate once, the second will mutate twice, the nth individual will Mutate\nn-times per iteration.",5,null],[11,"increasing_exp_mutation_rate","","Configures the mutation rates (number of mutation runs) for all the individuals in the sumulation:\nInstead of a linear growing mutation rate like in the `increasing_mutation_rate` function above\nthis sets an exponention mutation rate for all the individuals.\nThe first individual will mutate base^1 times, the second will mutate base^2 times, and nth\nwill mutate base^n times per iteration.",5,null],[11,"mutation_rate","","Configures the mutation rates (number of mutation runs) for all the individuals in the sumulation:\nThis allows to specify an arbitrary mutation scheme for each individual.\nThe number of rates must be equal to the number of individuals.",5,null],[11,"finalize","","This checks the configuration of the simulation and returns an error or Ok if no errors where found.",5,null]],"paths":[[3,"Simulation"],[3,"IndividualWrapper"],[4,"SimulationType"],[4,"BuilderResult"],[8,"Individual"],[3,"SimulationBuilder"]]}; initSearch(searchIndex);