NArray
Attributes
- Source
- package.scala
- Graph
-
- Supertypes
- Self type
-
NArray.type
Members list
Value members
Concrete methods
Copy one array to another, truncating or padding with default values (if necessary) so the copy has the specified length. The new array can have a different type than the original one as long as the values are assignment-compatible. When copying between primitive and object arrays, boxing and unboxing are supported.
Copy one array to another, truncating or padding with default values (if necessary) so the copy has the specified length. The new array can have a different type than the original one as long as the values are assignment-compatible. When copying between primitive and object arrays, boxing and unboxing are supported.
Equivalent to Java's java.util.Arrays.copyOf(original, newLength, newType), except that this works for all combinations of primitive and object arrays in a single method.
Attributes
- See also
-
java.util.Arrays#copyOf - Source
- package.scala
Copy one array to another.
Copy one array to another.
Note that the passed-in dest array will be modified by this call.
Value parameters
- dest
-
destination array.
- destPos
-
starting position in the destination array.
- src
-
the source array.
Attributes
- See also
-
java.lang.System#arraycopy - Source
- package.scala
Copy one array to another. Shim for Java's System.arraycopy(src, srcPos, dest, destPos, length), except that this slices the sub array, temporarily duplicating data.
Copy one array to another. Shim for Java's System.arraycopy(src, srcPos, dest, destPos, length), except that this slices the sub array, temporarily duplicating data.
Note that the passed-in dest array will be modified by this call.
Value parameters
- dest
-
destination array.
- destPos
-
starting position in the destination array.
- length
-
the number of array elements to be copied.
- src
-
the source array.
- srcPos
-
starting position in the source array.
Attributes
- See also
-
java.lang.System#arraycopy - Source
- package.scala
Attributes
- Source
- package.scala
Attributes
- Source
- package.scala
Attributes
- Source
- package.scala
Attributes
- Source
- package.scala
Attributes
- Source
- package.scala
Attributes
- Source
- package.scala
Attributes
- Source
- package.scala
Attributes
- Source
- package.scala
Copy one array to another, truncating or padding with default values (if necessary) so the copy has the specified length.
Copy one array to another, truncating or padding with default values (if necessary) so the copy has the specified length.
Equivalent to Java's java.util.Arrays.copyOf(original, newLength), except that this works for primitive and object arrays in a single method.
Attributes
- See also
-
java.util.Arrays#copyOf - Source
- package.scala
Attributes
- Source
- package.scala
Attributes
- Source
- package.scala
Partitions this array into a map of arrays according to some discriminator function.
Partitions this array into a map of arrays according to some discriminator function.
Type parameters
- K
-
the type of keys returned by the discriminator function.
Value parameters
- f
-
the discriminator function.
Attributes
- Returns
-
A map from keys to arrays such that the following invariant holds:
(xs groupBy f)(k) = xs filter (x => f(x) == k)* That is, every key `k` is bound to an array nts `x` for which `f(x)` equals `k`. - Source
- package.scala
Converts an array of pairs into an array of first elements and an array of second elements.
Converts an array of pairs into an array of first elements and an array of second elements.
Type parameters
- A1
-
the type of the first half of the element pairs
- A2
-
the type of the second half of the element pairs
Value parameters
- asPair
-
an implicit conversion which asserts that the element type of this Array is a pair.
- ct1
-
a class tag for
A1type parameter that is required to create an instance ofArray[A1] - ct2
-
a class tag for
A2type parameter that is required to create an instance ofArray[A2]
Attributes
- Returns
-
a pair of Arrays, containing, respectively, the first and second half of each element pair of this Array.
- Source
- package.scala