EntityCopies

EntityCopies[entity,n]

represents n copies of entity.

Details

  • An entity is generally specified as Entity[type,canonicalname]. A list of currently available entity types is given by EntityValue[].
  • Entity expressions can be created by using the interface.
  • The number of copies n may be any positive integer.

Examples

open allclose all

Basic Examples  (3)

Return the total mass of three tennis balls:

Output the luminosity of two suns:

Output the material out of which three (separate) footballs are made:

Scope  (4)

EntityCopies expressions can be used alongside regular entities in lists:

Extensive property values of EntityCopies yield the total value of all copies:

Since volume is extensive, the value for two basketballs is twice the volume of a single basketball:

Non-extensive property values of EntityCopies repeat their value for each copy:

Computed values of multiple copies of an entity may return a combination of total value plus a list of values for properties of differing type (i.e. some extensive and some not):

Generalizations & Extensions  (1)

EntityValue treats an EntityGroup of n copies of an entity in the same way as EntityCopies[entity,n]:

Properties & Relations  (3)

Extensive property values for no copies return 0:

Intensive property values for no copies return an empty list:

EntityCopies remains unevaluated for a single copy:

Operations on an EntityCopies expression containing a single copy are equivalent to those on a normal Entity:

Verify equality:

Possible Issues  (2)

Attempting to give an invalid entity count returns an appropriate form of Missing:

EntityCopies expressions can be returned in differing units than analogous quantities:

Verify equality:

Introduced in 2015
 (10.3)