更改

跳到导航 跳到搜索
添加304字节 、 2020年10月15日 (四) 14:28
无编辑摘要
第160行: 第160行:  
In computer science a quine is a self-reproducing computer program that, when executed, outputs its own code. For example, a quine in the Python programming language is:
 
In computer science a quine is a self-reproducing computer program that, when executed, outputs its own code. For example, a quine in the Python programming language is:
   −
在计算机科学中,quine 是一种自我复制的计算机程序,当执行时,输出自己的代码。例如,Python 的一个 quine 是:
+
在计算机科学中,quine 是一种自我复制的计算机程序,当执行时,输出自己的代码。例如,利用Python语言编写的一个 quine 是:
      第169行: 第169行:     
<code>a='a=%r;print(a%%a)';print(a%a)</code>
 
<code>a='a=%r;print(a%%a)';print(a%a)</code>
  −
代码为‘ a% r; print (a% a)’ ; print (a% a) / code
        第180行: 第178行:  
A more trivial approach is to write a program that will make a copy of any stream of data that it is directed to, and then direct it at itself. In this case the program is treated as both executable code, and as data to be manipulated. This approach is common in most self-replicating systems, including biological life, and is simpler as it does not require the program to contain a complete description of itself.
 
A more trivial approach is to write a program that will make a copy of any stream of data that it is directed to, and then direct it at itself. In this case the program is treated as both executable code, and as data to be manipulated. This approach is common in most self-replicating systems, including biological life, and is simpler as it does not require the program to contain a complete description of itself.
   −
一种更简单的方法是编写一个程序,该程序将复制它所指向的任何数据流,然后指向它自己。在这种情况下,程序既被当作可执行代码,也被当作要操作的数据。这种方法在包括生物生命在内的大多数自我复制系统中都很常见,而且更简单,因为它不需要程序包含对自身的完整描述。
+
一种更简单的方法是编写一个程序,这个程序将复制它所指向的任何数据流,然后指向它自己。在这种情况下,程序既被当作可执行代码,也被当作要操作的数据。这种方法在包括生物生命在内的大多数自复制系统中都很常见,而且更简单,因为它不需要程序包含对自身的完整描述。
      第190行: 第188行:  
In many programming languages an empty program is legal, and executes without producing errors or other output. The output is thus the same as the source code, so the program is trivially self-reproducing.
 
In many programming languages an empty program is legal, and executes without producing errors or other output. The output is thus the same as the source code, so the program is trivially self-reproducing.
   −
在许多编程语言中,空程序是合法的,并且执行时不会产生错误或其他输出。因此,输出是相同的源代码,所以程序是微不足道的自我复制。
+
在许多编程语言中,空程序是合法的,并且执行时不会产生错误或其他输出。因此,其输出是相同的源代码,所以这种程序是微不足道的自复制。
      第198行: 第196行:  
===Self-replicating tiling===
 
===Self-replicating tiling===
   −
===Self-replicating tiling===
+
===Self-replicating tiling 自复制式平铺===
 +
 
   −
自我复制瓷砖
      
{{See also|Self-similarity}}
 
{{See also|Self-similarity}}
第214行: 第212行:  
In geometry a self-replicating tiling is a tiling pattern in which several congruent tiles may be joined together to form a larger tile that is similar to the original.  This is an aspect of the field of study known as tessellation.  The "sphinx" hexiamond is the only known self-replicating pentagon.  For example, four such concave pentagons can be joined together to make one with twice the dimensions. Solomon W. Golomb coined the term rep-tiles for self-replicating tilings.
 
In geometry a self-replicating tiling is a tiling pattern in which several congruent tiles may be joined together to form a larger tile that is similar to the original.  This is an aspect of the field of study known as tessellation.  The "sphinx" hexiamond is the only known self-replicating pentagon.  For example, four such concave pentagons can be joined together to make one with twice the dimensions. Solomon W. Golomb coined the term rep-tiles for self-replicating tilings.
   −
在几何学中,一个自我复制的瓷砖是一个瓷砖模式,其中几个相等的瓷砖可以连接在一起,形成一个较大的瓷砖,类似于原来的。这是一个方面的研究领域称为镶嵌。“狮身人面像”赫西阿蒙德是已知唯一能自我复制的五角大楼。例如,四个这样的凹形五边形可以连接在一起,形成一个尺寸是原来两倍的五边形。所罗门·格伦布创造了术语 rep-tiles 来描述自我复制的耕作。
+
在几何学中,自复制式平铺是一种平铺方法,其中几个全等的瓷砖可以连接在一起,形成一个较大的类似于原来的瓷砖。这是一个被称为镶嵌的研究领域的一个方面。“狮身人面像”六面双锥体是已知唯一能自复制的五角形。
 +
  --[[用户:粲兰|袁一博]]([[用户讨论:粲兰|讨论]])“‘狮身人面像’六面双锥体是已知唯一能自复制的五角形。”这句对应原句"The 'sphinx' hexiamond is the only known self-replicating pentagon."疑似存在集合上的逻辑错误,hexiamond并不是一个平面几何图形。
 +
例如,四个这样的凹形五边形可以连接在一起,形成一个尺寸是原来两倍的五边形。所罗门·W·格伦布(Solomon W. Golomb)创造了术语 rep-tiles 来描述自复制式平铺。
     
97

个编辑

导航菜单