本文整理汇总了Python中GenomeBase.GenomeBase.__repr__方法的典型用法代码示例。如果您正苦于以下问题:Python GenomeBase.__repr__方法的具体用法?Python GenomeBase.__repr__怎么用?Python GenomeBase.__repr__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GenomeBase.GenomeBase
的用法示例。
在下文中一共展示了GenomeBase.__repr__方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __repr__
# 需要导入模块: from GenomeBase import GenomeBase [as 别名]
# 或者: from GenomeBase.GenomeBase import __repr__ [as 别名]
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
示例2: __repr__
# 需要导入模块: from GenomeBase import GenomeBase [as 别名]
# 或者: from GenomeBase.GenomeBase import __repr__ [as 别名]
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
示例3: __repr__
# 需要导入模块: from GenomeBase import GenomeBase [as 别名]
# 或者: from GenomeBase.GenomeBase import __repr__ [as 别名]
def __repr__(self):
""" Return a string representation of Genome """
ret = GenomeBase.__repr__(self)
ret += GTreeBase.__repr__(self)
ret += "\n- GTreeGP\n"
ret += "\tExpression: %s\n" % self.getPreOrderExpression()
return ret
示例4: __repr__
# 需要导入模块: from GenomeBase import GenomeBase [as 别名]
# 或者: from GenomeBase.GenomeBase import __repr__ [as 别名]
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
示例5: __repr__
# 需要导入模块: from GenomeBase import GenomeBase [as 别名]
# 或者: from GenomeBase.GenomeBase import __repr__ [as 别名]
def __repr__(self):
""" Return a string representation of Genome """
ret = GenomeBase.__repr__(self)
ret += "- G2DList\n"
ret += "\tList size:\t %s\n" % (self.getSize(),)
ret += "\tList:\n"
for line in self.genomeList:
ret += "\t\t\t"
for item in line:
ret += "[%s] " % (item)
ret += "\n"
ret += "\n"
return ret