(ga_engine, filename, format="jpeg", start=0, end=0)
Writes to a graphical file using pydot, the population of trees

        Example:
           >>> GTreeGP.writePopulationDot(ga_engine, "pop.jpg", "jpeg", 0, 10)

        This example will draw the first ten individuals of the population into
        the file called "pop.jpg".

        :param ga_engine: the GA Engine
        :param filename: the filename, ie. population.jpg
        :param start: the start index of individuals
        :param end: the end index of individuals
Writes to a graphical file using pydot, the population of trees
Writes to a graphical file using pydot the population of trees
def writePopulationDot(ga_engine, filename, format="jpeg", start=0, end=0):
        """ Writes to a graphical file using pydot, the population of trees

        Example:
           >>> GTreeGP.writePopulationDot(ga_engine, "pop.jpg", "jpeg", 0, 10)

        This example will draw the first ten individuals of the population into
        the file called "pop.jpg".

        :param ga_engine: the GA Engine
        :param filename: the filename, ie. population.jpg
        :param start: the start index of individuals
        :param end: the end index of individuals
        """
        if not HAVE_PYDOT:
            Util.raiseException("You must install Pydot to use this feature !")

        pop = ga_engine.getPopulation()
        graph = pydot.Dot(graph_type="digraph")

        if not isinstance(pop[0], GTreeGP):
            Util.raiseException("The population must have individuals of the GTreeGP chromosome !")

        n = 0
        end_index = len(pop) if end == 0 else end
        for i in xrange(start, end_index):
            ind = pop[i]
            subg = pydot.Cluster(
                "cluster_%d" % i,
                label="\"Ind. #%d - Score Raw/Fit.: %.4f/%.4f\"" % (i, ind.getRawScore(), ind.getFitnessScore())
            )
            n = ind.writeDotGraph(subg, n)
            graph.add_subgraph(subg)

        graph.write(filename, prog='dot', format=format)
def writePopulationDot ( ga_engine , filename , format = "jpeg" , start = 0 , end = 0 ) : if not HAVE_PYDOT : Util . raiseException ( "You must install Pydot to use this feature !" ) pop = ga_engine . getPopulation ( ) graph = pydot . Dot ( graph_type = "digraph" ) if not isinstance ( pop [ 0 ] , GTreeGP ) : Util . raiseException ( "The population must have individuals of the GTreeGP chromosome !" ) n = 0 end_index = len ( pop ) if end == 0 else end for i in xrange ( start , end_index ) : ind = pop [ i ] subg = pydot . Cluster ( "cluster_%d" % i , label = "\"Ind. #%d - Score Raw/Fit.: %.4f/%.4f\"" % ( i , ind . getRawScore ( ) , ind . getFitnessScore ( ) ) ) n = ind . writeDotGraph ( subg , n ) graph . add_subgraph ( subg ) graph . write ( filename , prog = 'dot' , format = format )