ArrayUtils
fm.common.ArrayUtils$
object ArrayUtils
Attributes
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Self type
- ArrayUtils.type
Members list
Concise view
Value members
Concrete methods
Return all permutations of values of an array of arrays
Return all permutations of values of an array of arrays
e.g.: scala> permutations(Array(Array(1,2,3), Array(1,2,3), Array(1,2))).map{ _.mkString(",") }.foreach{println} 1,1,1 1,1,2 1,2,1 1,2,2 1,3,1 1,3,2 2,1,1 2,1,2 2,2,1 2,2,2 2,3,1 2,3,2 3,1,1 3,1,2 3,2,1 3,2,2 3,3,1 3,3,2
Retain Ordering = false:
1,1,1 2,1,1 3,1,1 1,2,1 2,2,1 3,2,1 1,3,1 2,3,1 3,3,1 1,1,2 2,1,2 3,1,2 1,2,2 2,2,2 3,2,2 1,3,2 2,3,2 3,3,2
http://stackoverflow.com/questions/5751091/permutations-of-an-array-of-arrays-of-strings
Attributes
def shingles[T : ClassTag](parts: IndexedSeq[T], minShingleSize: Int, maxShingleSize: Int, forceIncludeOriginal: Boolean): ImmutableArray[ImmutableArray[T]]