FindRepeat
FindRepeat[list]
finds the minimal sublist that repeats to give list.
FindRepeat[list,n]
requires that the sublist is repeated at least n times in list.
FindRepeat[list,{n1,n2,…}]
requires ni repeats at level i in list.
FindRepeat["string"]
finds the minimal substring that repeats to give string.
FindRepeat["string",n]
requires that the substring is repeated at least n times.
Details and Options
- FindRepeat[expr] gives expr if no repeat is found.
- FindRepeat[list,2] gives {} if no repeat is found. FindRepeat["string",2] gives "".
- FindRepeat[expr] allows incomplete repeats at the end of expr.
- FindRepeat[expr,n] requires at least n complete repeats.
- FindRepeat[list] is equivalent to FindRepeat[list,Table[1,ArrayDepth[list]]].
- The length of the list {n1,n2,…} must be less than or equal to ArrayDepth[list].
- FindRepeat works on SparseArray and StructuredArray objects.
- FindRepeat works on associations, effectively ignoring their keys and returning an association with keys corresponding to the first occurrence of the repeated block.
- FindRepeat[list,{n1,n2,…,nk},SameTest->test] applies test to each pair of elements at level k to determine whether they should be considered the same.
Examples
open allclose allBasic Examples (4)
Scope (10)
Options (4)
Applications (6)
Properties & Relations (5)
See Also
FindTransientRepeat Fourier FindSequenceFunction FunctionPeriod Repeated StringRepeat Table
Related Guides
Introduced in 2017
(11.2)
