示例#1
0
    def copy(self, g):
        """ Copy the contents to the destination g

        :param g: the GTree genome destination
        """
        GenomeBase.copy(self, g)
        GTreeBase.copy(self, g)
示例#2
0
    def copy(self, g):
        """ Copy the contents to the destination g

        :param g: the GTree genome destination
        """
        GenomeBase.copy(self, g)
        GTreeBase.copy(self, g)
 def copy(self, g):
     GenomeBase.copy(self, g)
     g.num_populated_areas = self.num_populated_areas
     g.num_power_plants = self.num_power_plants
     g.loss_network = self.loss_network
     if self.proposed_distribution is not None:
         g.proposed_distribution = clone_matrix(self.proposed_distribution)
示例#4
0
 def copy(self, g):
     """ Copy genome to 'g' """
     GenomeBase.copy(self, g)
     g.ruleSet = self.ruleSet[:]  #deep copy
     g.rulePartition = self.rulePartition[:]  #deep copy
     g.ruleSetSize = self.ruleSetSize
     g.rule_length = self.rule_length
     g.examples = self.examples  # only a ref to the examples is copied
示例#5
0
	def copy(self, g):
		""" Copy genome to 'g' """
		GenomeBase.copy(self, g)
		g.ruleSet = self.ruleSet[:] #deep copy
		g.rulePartition = self.rulePartition[:] #deep copy
		g.ruleSetSize = self.ruleSetSize
		g.rule_length = self.rule_length
		g.examples = self.examples # only a ref to the examples is copied
示例#6
0
    def copy(self, g):
        """ Copy genome to 'g'

        Example:
           >>> genome_origin.copy(genome_destination)

        :param g: the destination G1DList instance

        """
        GenomeBase.copy(self, g)
        G1DBase.copy(self, g)
示例#7
0
    def copy(self, g):
        """ Copy genome to 'g'

        Example:
           >>> genome_origin.copy(genome_destination)

        :param g: the destination G1DList instance

        """
        GenomeBase.copy(self, g)
        G1DBase.copy(self, g)
示例#8
0
    def copy(self, g):
        """ Copy genome to 'g'
        
      Example:
      >>> genome_origin.copy(genome_destination)
      
      :param g: the destination G1DConnections instance

      """
        GenomeBase.copy(self, g)
        #G1DBase.copy(self, g)
        g.genomeSize=self.genomeSize
        g.genomeList=copy.deepcopy(self.genomeList)
示例#9
0
    def copy(self, g):
        """ Copy genome to 'g'

        Example:
           >>> genome_origin.copy(genome_destination)

        :param g: the destination G2DList instance

        """
        GenomeBase.copy(self, g)
        g.height = self.height
        g.width = self.width
        for i in xrange(self.height):
            g.genomeList[i] = self.genomeList[i][:]
示例#10
0
   def copy(self, g):
      """ Copy genome to 'g'

      Example:
         >>> g1 = G1DBinaryString(2)
         >>> g1.append(0)
         >>> g1.append(1)
         >>> g2 = G1DBinaryString(2)
         >>> g1.copy(g2)
         >>> g2[1]
         1

      :param g: the destination genome

      """
      GenomeBase.copy(self, g)
      G1DBase.copy(self, g)
示例#11
0
 def copy(self, g):
     GenomeBase.copy(self, g)
     GMapBase.copy(self, g)
示例#12
0
 def copy(self, g):
   """Copy method required by pyevolve"""
   GenomeBase.copy(self, g)
   g.bg = self.bg
   g.shapes = self.shapes[:]
   g.target = self.target
 def copy(self, g):
    GenomeBase.copy(self, g)
    g.listSize = self.listSize
    g.genomeList = self.genomeList[:]
示例#14
0
 def copy(self, g):
     """ Copy genome to 'g' """
     GenomeBase.copy(self, g)
     g.height = self.height
     g.width = self.width
     g.depth = self.depth
示例#15
0
 def copy(self, g):
     GenomeBase.copy(self, g)
     g.listSize = self.listSize
     g.genomeList = self.genomeList[:]