当前位置: 首页>>代码示例>>Python>>正文


Python GenomeBase.GenomeBase类代码示例

本文整理汇总了Python中GenomeBase.GenomeBase的典型用法代码示例。如果您正苦于以下问题:Python GenomeBase类的具体用法?Python GenomeBase怎么用?Python GenomeBase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了GenomeBase类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: copy

    def copy(self, g):
        """ Copy the contents to the destination g

        :param g: the GTreeGP genome destination
        """
        GenomeBase.copy(self, g)
        GTreeBase.copy(self, g)
开发者ID:MaximilianoRios,项目名称:Pyevolve,代码行数:7,代码来源:GTree.py

示例2: __init__

 def __init__(self, root_node=None, cloning=False):
     GenomeBase.__init__(self)
     GTreeBase.__init__(self, root_node)
     if not cloning:
         self.initializator.set(Consts.CDefGTreeGPInit)
         self.mutator.set(Consts.CDefGGTreeGPMutator)
         self.crossover.set(Consts.CDefGTreeGPCrossover)
开发者ID:MaximilianoRios,项目名称:Pyevolve,代码行数:7,代码来源:GTree.py

示例3: __init__

 def __init__(self, length=10):
    """ The initializator of G1DList representation, size parameter must be specified """
    GenomeBase.__init__(self)
    self.genomeString = []
    self.stringLength = length
    self.initializator.set(Consts.CDefG1DBinaryStringInit)
    self.mutator.set(Consts.CDefG1DBinaryStringMutator)
    self.crossover.set(Consts.CDefG1DBinaryStringCrossover)
开发者ID:alx21,项目名称:silevolve,代码行数:8,代码来源:G1DBinaryString.py

示例4: __init__

 def __init__(self, length=10):
    """ The initializator of G1DList representation """
    GenomeBase.__init__(self)
    G1DBase.__init__(self, length)
    self.genomeList = []
    self.stringLength = length
    self.initializator.set(Consts.CDefG1DBinaryStringInit)
    self.mutator.set(Consts.CDefG1DBinaryStringMutator)
    self.crossover.set(Consts.CDefG1DBinaryStringCrossover)
开发者ID:MaximilianoRios,项目名称:Pyevolve,代码行数:9,代码来源:G1DBinaryString.py

示例5: __init__

 def __init__(self, size=10, cloning=False):
     """ The initializator of G1DList representation,
     size parameter must be specified """
     GenomeBase.__init__(self)
     G1DBase.__init__(self, size)
     if not cloning:
         self.initializator.set(Consts.CDefG1DListInit)
         self.mutator.set(Consts.CDefG1DListMutator)
         self.crossover.set(Consts.CDefG1DListCrossover)
开发者ID:msabramo,项目名称:Pyevolve,代码行数:9,代码来源:G1DList.py

示例6: __init__

 def __init__(self, size):
    """ The initializator of G1DList representation,
    size parameter must be specified """
    GenomeBase.__init__(self)
    self.genomeList = []
    self.listSize = size
    self.initializator.set(Consts.CDefG1DListInit)
    self.mutator.set(Consts.CDefG1DListMutator)
    self.crossover.set(Consts.CDefG1DListCrossover)
开发者ID:abrahamdone,项目名称:cs5600ai,代码行数:9,代码来源:G1DList.py

示例7: copy

   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)
开发者ID:tomerf,项目名称:Pyevolve,代码行数:11,代码来源:G1DList.py

示例8: copy

   def copy(self, g):
      """ Copy genome to 'g'
      
      Example:
         >>> genome_origin.copy(genome_destination)
      
      :param g: the destination G1DList instance

      """
      GenomeBase.copy(self, g)
      g.listSize = self.listSize
      g.genomeList = self.genomeList[:]
开发者ID:abrahamdone,项目名称:cs5600ai,代码行数:12,代码来源:G1DList.py

示例9: copy

    def copy(self, g):
        """ Copy genome to 'g'

        Example:
           >>> genome_origin.copy(genome_destination)

        :param g: the destination G2DCartesian instance

        """
        GenomeBase.copy(self, g)
        g.expressionNodes = self.expressionNodes.copy()
        g.reevaluate = self.reevaluate
        g.nodes = copy.deepcopy(self.nodes)
开发者ID:ImpactHorizon,项目名称:Pyevolve,代码行数:13,代码来源:G2DCartesian.py

示例10: copy

   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][:]
开发者ID:DamionKing,项目名称:Pyevolve,代码行数:14,代码来源:G2DList.py

示例11: __init__

    def __init__(self, height, width):
        """ The initializator of G2DBinaryString representation,
        height and width must be specified """
        GenomeBase.__init__(self)
        self.height = height
        self.width = width

        self.genomeString = [None] * height
        for i in xrange(height):
            self.genomeString[i] = [None] * width

        self.initializator.set(Consts.CDefG2DBinaryStringInit)
        self.mutator.set(Consts.CDefG2DBinaryStringMutator)
        self.crossover.set(Consts.CDefG2DBinaryStringCrossover)
开发者ID:MaximilianoRios,项目名称:Pyevolve,代码行数:14,代码来源:G2DBinaryString.py

示例12: __init__

   def __init__(self, height, width, cloning=False):
      """ The initializator of G2DList representation,
      height and width must be specified """
      GenomeBase.__init__(self)
      self.height = height
      self.width = width

      self.genomeList = [None]*height
      for i in xrange(height):
         self.genomeList[i] = [None] * width

      if not cloning:
         self.initializator.set(Consts.CDefG2DListInit)
         self.mutator.set(Consts.CDefG2DListMutator)
         self.crossover.set(Consts.CDefG2DListCrossover)
开发者ID:DamionKing,项目名称:Pyevolve,代码行数:15,代码来源:G2DList.py

示例13: __repr__

 def __repr__(self):
    """ Return a string representation of Genome """
    ret = GenomeBase.__repr__(self)
    ret += "- G1DList\n"
    ret += "\tList size:\t %s\n" % (self.listSize,)
    ret += "\tList:\t\t %s\n\n" % (self.genomeList,) 
    return ret
开发者ID:abrahamdone,项目名称:cs5600ai,代码行数:7,代码来源:G1DList.py

示例14: __repr__

 def __repr__(self):
    """ Return a string representation of Genome """
    ret = GenomeBase.__repr__(self)
    ret += "- G1DBinaryString\n"
    ret += "\tString length:\t %s\n" % (self.getListSize(),)
    ret += "\tString:\t\t %s\n\n" % (self.getBinary(),)
    return ret
开发者ID:ClaudomiroSales,项目名称:Pyevolve,代码行数:7,代码来源:G1DBinaryString.py

示例15: __repr__

 def __repr__(self):
     """ Return a string representation of Genome """
     ret = GenomeBase.__repr__(self)
     ret += "- G2DCartesian\n"
     ret += "\tList size:\t %s\n" % (len(self.nodes,))
     ret += "\tList:\t\t %s\n\n" % (self.nodes,)
     return ret
开发者ID:ImpactHorizon,项目名称:Pyevolve,代码行数:7,代码来源:G2DCartesian.py


注:本文中的GenomeBase.GenomeBase类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。