Scala Library
|
|
scala/Array.scala
]
object
Array
extends
FallbackArrayBuildingMethod Summary | |
def
|
apply (x : Char, xs : Char*) : Array[Char] |
def
|
apply
[T](xs : T*)(implicit evidence$2 : ClassManifest[T]) : Array[T]
Create an array with given elements.
|
def
|
apply (x : Double, xs : Double*) : Array[Double] |
def
|
apply (x : Float, xs : Float*) : Array[Float] |
def
|
apply (x : Int, xs : Int*) : Array[Int] |
def
|
apply (x : Long, xs : Long*) : Array[Long] |
def
|
apply (x : Short, xs : Short*) : Array[Short] |
def
|
apply (x : Boolean, xs : Boolean*) : Array[Boolean] |
def
|
apply (x : Unit, xs : Unit*) : Array[Unit] |
def
|
apply (x : Byte, xs : Byte*) : Array[Byte] |
implicit def
|
canBuildFrom
[T](implicit m : ClassManifest[T]) : CanBuildFrom[Array[Any], T, Array[T]]
|
def
|
concat
[T](xss : Array[T]*)(implicit evidence$8 : ClassManifest[T]) : Array[T]
Concatenate all argument sequences into a single array.
|
def
|
copy
(src : AnyRef, srcPos : Int, dest : AnyRef, destPos : Int, length : Int) : Unit
Copy one array to another.
Equivalent to
System.arraycopy(src, srcPos, dest, destPos, length) ,
except that this works also for polymorphic and boxed arrays. |
def
|
empty
[T](implicit evidence$1 : ClassManifest[T]) : Array[T]
Returns array of length 0
|
def
|
fill
[T](n : Int)(elem : => T)(implicit evidence$9 : ClassManifest[T]) : Array[T]
An array that contains the results of some element computation a number
of times.
|
def
|
fill
[T](n1 : Int, n2 : Int, n3 : Int, n4 : Int)(elem : => T)(implicit evidence$12 : ClassManifest[T]) : Array[Array[Array[Array[T]]]]
A four-dimensional array that contains the results of some element
computation a number of times.
|
def
|
fill
[T](n1 : Int, n2 : Int, n3 : Int, n4 : Int, n5 : Int)(elem : => T)(implicit evidence$13 : ClassManifest[T]) : Array[Array[Array[Array[Array[T]]]]]
A five-dimensional array that contains the results of some element
computation a number of times.
|
def
|
fill
[T](n1 : Int, n2 : Int)(elem : => T)(implicit evidence$10 : ClassManifest[T]) : Array[Array[T]]
A two-dimensional array that contains the results of some element
computation a number of times.
|
def
|
fill
[T](n1 : Int, n2 : Int, n3 : Int)(elem : => T)(implicit evidence$11 : ClassManifest[T]) : Array[Array[Array[T]]]
A three-dimensional array that contains the results of some element
computation a number of times.
|
def
|
fromFunction
[T](f : (Int, Int) => T)(n1 : Int, n2 : Int)(implicit evidence$22 : ClassManifest[T]) : Array[Array[T]]
Create an array containing the values of a given function
f
over given range [0..n1, 0..n2) |
def
|
fromFunction
[T](f : (Int, Int, Int) => T)(n1 : Int, n2 : Int, n3 : Int)(implicit evidence$23 : ClassManifest[T]) : Array[Array[Array[T]]]
Create an array containing the values of a given function
f
over given range [0..n1, 0..n2, 0..n3) |
def
|
fromFunction
[T](f : (Int, Int, Int, Int, Int) => T)(n1 : Int, n2 : Int, n3 : Int, n4 : Int, n5 : Int)(implicit evidence$25 : ClassManifest[T]) : Array[Array[Array[Array[Array[T]]]]]
Create an array containing the values of a given function
f
over given range [0..n1, 0..n2, 0..n3, 0..n4, 0..n5) |
def
|
fromFunction
[T](f : (Int, Int, Int, Int) => T)(n1 : Int, n2 : Int, n3 : Int, n4 : Int)(implicit evidence$24 : ClassManifest[T]) : Array[Array[Array[Array[T]]]]
Create an array containing the values of a given function
f
over given range [0..n1, 0..n2, 0..n3, 0..n4) |
def
|
fromFunction
[T](f : (Int) => T)(n : Int)(implicit evidence$21 : ClassManifest[T]) : Array[T]
Create an array containing the values of a given function
f
over given range [0..n) |
def
|
iterate
[T](start : T, len : Int)(f : (T) => T)(implicit evidence$19 : ClassManifest[T]) : Array[T]
An array containing repeated applications of a function to a start value.
|
def
|
make
[T](n : Int, elem : T)(implicit evidence$20 : ClassManifest[T]) : Array[T]
Create an array containing several copies of an element.
|
def
|
newBuilder
[T](implicit m : ClassManifest[T]) : ArrayBuilder[T]
|
def
|
ofDim
[T](n1 : Int, n2 : Int, n3 : Int, n4 : Int)(implicit evidence$6 : ClassManifest[T]) : Array[Array[Array[Array[T]]]]
|
def
|
ofDim
[T](n1 : Int, n2 : Int, n3 : Int)(implicit evidence$5 : ClassManifest[T]) : Array[Array[Array[T]]]
|
def
|
ofDim
[T](n1 : Int)(implicit evidence$3 : ClassManifest[T]) : Array[T]
Create array with given dimensions
|
def
|
ofDim
[T](n1 : Int, n2 : Int, n3 : Int, n4 : Int, n5 : Int)(implicit evidence$7 : ClassManifest[T]) : Array[Array[Array[Array[Array[T]]]]]
|
def
|
ofDim
[T](n1 : Int, n2 : Int)(implicit evidence$4 : ClassManifest[T]) : Array[Array[T]]
|
def
|
range
(start : Int, end : Int, step : Int) : Array[Int]
An array containing equally spaced values in some integer interval.
|
def
|
range
(start : Int, end : Int) : Array[Int]
An array containing a sequence of increasing integers in a range.
|
def
|
tabulate
[T](n1 : Int, n2 : Int, n3 : Int, n4 : Int)(f : (Int, Int, Int, Int) => T)(implicit evidence$17 : ClassManifest[T]) : Array[Array[Array[Array[T]]]]
A four-dimensional array containing values of a given function over
ranges of integer values starting from 0.
|
def
|
tabulate
[T](n1 : Int, n2 : Int)(f : (Int, Int) => T)(implicit evidence$15 : ClassManifest[T]) : Array[Array[T]]
A two-dimensional array containing values of a given function over
ranges of integer values starting from 0.
|
def
|
tabulate
[T](n1 : Int, n2 : Int, n3 : Int, n4 : Int, n5 : Int)(f : (Int, Int, Int, Int, Int) => T)(implicit evidence$18 : ClassManifest[T]) : Array[Array[Array[Array[Array[T]]]]]
A five-dimensional array containing values of a given function over
ranges of integer values starting from 0.
|
def
|
tabulate
[T](n : Int)(f : (Int) => T)(implicit evidence$14 : ClassManifest[T]) : Array[T]
An array containing values of a given function over a range of integer
values starting from 0.
|
def
|
tabulate
[T](n1 : Int, n2 : Int, n3 : Int)(f : (Int, Int, Int) => T)(implicit evidence$16 : ClassManifest[T]) : Array[Array[Array[T]]]
A three-dimensional array containing values of a given function over
ranges of integer values starting from 0.
|
def
|
unapplySeq
[T](x : Array[T]) : Option[IndexedSeq[T]]
This method is called in a pattern match { case Seq(...) => }.
|
Methods inherited from FallbackArrayBuilding | |
fallbackCanBuildFrom |
Methods inherited from AnyRef | |
getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized |
Methods inherited from Any | |
==, !=, isInstanceOf, asInstanceOf |
Method Details |
implicit
def
canBuildFrom[T](implicit
m : ClassManifest[T]) : CanBuildFrom[Array[Any], T, Array[T]]
def
newBuilder[T](implicit
m : ClassManifest[T]) : ArrayBuilder[T]
System.arraycopy(src, srcPos, dest, destPos, length)
,
except that this works also for polymorphic and boxed arrays.src -
...srcPos -
...dest -
...destPos -
...length -
...
def
empty[T](implicit
evidence$1 : ClassManifest[T]) : Array[T]
def
apply[T](xs : T*)(implicit
evidence$2 : ClassManifest[T]) : Array[T]
xs -
the elements to put in the array
def
ofDim[T](n1 : Int)(implicit
evidence$3 : ClassManifest[T]) : Array[T]
def
ofDim[T](n1 : Int, n2 : Int, n3 : Int)(implicit
evidence$5 : ClassManifest[T]) : Array[Array[Array[T]]]
def
ofDim[T](n1 : Int, n2 : Int, n3 : Int, n4 : Int)(implicit
evidence$6 : ClassManifest[T]) : Array[Array[Array[Array[T]]]]
def
ofDim[T](n1 : Int, n2 : Int, n3 : Int, n4 : Int, n5 : Int)(implicit
evidence$7 : ClassManifest[T]) : Array[Array[Array[Array[Array[T]]]]]
xs -
the given argument sequencesn -
the number of elements returnedelem -
the element computation
def
fill[T](n1 : Int, n2 : Int)(elem : => T)(implicit
evidence$10 : ClassManifest[T]) : Array[Array[T]]
n1 -
the number of elements in the 1st dimensionn2 -
the number of elements in the 2nd dimensionelem -
the element computation
def
fill[T](n1 : Int, n2 : Int, n3 : Int)(elem : => T)(implicit
evidence$11 : ClassManifest[T]) : Array[Array[Array[T]]]
n1 -
the number of elements in the 1st dimensionn2 -
the number of elements in the 2nd dimensionn3 -
the number of elements in the 3nd dimensionelem -
the element computation
def
fill[T](n1 : Int, n2 : Int, n3 : Int, n4 : Int)(elem : => T)(implicit
evidence$12 : ClassManifest[T]) : Array[Array[Array[Array[T]]]]
n1 -
the number of elements in the 1st dimensionn2 -
the number of elements in the 2nd dimensionn3 -
the number of elements in the 3nd dimensionn4 -
the number of elements in the 4th dimensionelem -
the element computation
def
fill[T](n1 : Int, n2 : Int, n3 : Int, n4 : Int, n5 : Int)(elem : => T)(implicit
evidence$13 : ClassManifest[T]) : Array[Array[Array[Array[Array[T]]]]]
n1 -
the number of elements in the 1st dimensionn2 -
the number of elements in the 2nd dimensionn3 -
the number of elements in the 3nd dimensionn4 -
the number of elements in the 4th dimensionn5 -
the number of elements in the 5th dimensionelem -
the element computationn -
The number of elements in the traversablef -
The function computing element values
def
tabulate[T](n1 : Int, n2 : Int)(f : (Int, Int) => T)(implicit
evidence$15 : ClassManifest[T]) : Array[Array[T]]
n1 -
the number of elements in the 1st dimensionn2 -
the number of elements in the 2nd dimensionf -
The function computing element values
def
tabulate[T](n1 : Int, n2 : Int, n3 : Int)(f : (Int, Int, Int) => T)(implicit
evidence$16 : ClassManifest[T]) : Array[Array[Array[T]]]
n1 -
the number of elements in the 1st dimensionn2 -
the number of elements in the 2nd dimensionn3 -
the number of elements in the 3nd dimensionf -
The function computing element values
def
tabulate[T](n1 : Int, n2 : Int, n3 : Int, n4 : Int)(f : (Int, Int, Int, Int) => T)(implicit
evidence$17 : ClassManifest[T]) : Array[Array[Array[Array[T]]]]
n1 -
the number of elements in the 1st dimensionn2 -
the number of elements in the 2nd dimensionn3 -
the number of elements in the 3nd dimensionn4 -
the number of elements in the 4th dimensionf -
The function computing element values
def
tabulate[T](n1 : Int, n2 : Int, n3 : Int, n4 : Int, n5 : Int)(f : (Int, Int, Int, Int, Int) => T)(implicit
evidence$18 : ClassManifest[T]) : Array[Array[Array[Array[Array[T]]]]]
n1 -
the number of elements in the 1st dimensionn2 -
the number of elements in the 2nd dimensionn3 -
the number of elements in the 3nd dimensionn4 -
the number of elements in the 4th dimensionn5 -
the number of elements in the 5th dimensionf -
The function computing element valuesfrom -
the start value of the arrayend -
the end value of the array (the first value NOT returned)start -
the start value of the arrayend -
the end value of the array (the first value NOT returned)step -
the increment value of the array (must be positive or negative)
def
iterate[T](start : T, len : Int)(f : (T) => T)(implicit
evidence$19 : ClassManifest[T]) : Array[T]
start -
the start value of the arraylen -
the number of elements returned by the arrayf -
the function that's repeatedly applied
def
unapplySeq[T](x : Array[T]) : Option[IndexedSeq[T]]
x -
the selector value
def
make[T](n : Int, elem : T)(implicit
evidence$20 : ClassManifest[T]) : Array[T]
n -
the length of the resulting arrayelem -
the element composing the resulting array
def
fromFunction[T](f : (Int) => T)(n : Int)(implicit
evidence$21 : ClassManifest[T]) : Array[T]
f
over given range [0..n)
def
fromFunction[T](f : (Int, Int) => T)(n1 : Int, n2 : Int)(implicit
evidence$22 : ClassManifest[T]) : Array[Array[T]]
f
over given range [0..n1, 0..n2)
def
fromFunction[T](f : (Int, Int, Int) => T)(n1 : Int, n2 : Int, n3 : Int)(implicit
evidence$23 : ClassManifest[T]) : Array[Array[Array[T]]]
f
over given range [0..n1, 0..n2, 0..n3)
def
fromFunction[T](f : (Int, Int, Int, Int) => T)(n1 : Int, n2 : Int, n3 : Int, n4 : Int)(implicit
evidence$24 : ClassManifest[T]) : Array[Array[Array[Array[T]]]]
f
over given range [0..n1, 0..n2, 0..n3, 0..n4)
def
fromFunction[T](f : (Int, Int, Int, Int, Int) => T)(n1 : Int, n2 : Int, n3 : Int, n4 : Int, n5 : Int)(implicit
evidence$25 : ClassManifest[T]) : Array[Array[Array[Array[Array[T]]]]]
f
over given range [0..n1, 0..n2, 0..n3, 0..n4, 0..n5)
Scala Library
|
|