DoublesCursor

final class DoublesCursor(underlying: ArrayCursor[Double]) extends BatchCursor[Double]

BatchCursor implementation specialized for Double.

Under the hood it uses an ArrayCursor implementation, which is @specialized. Using DoublesCursor might be desirable instead for isInstanceOf checks.

trait Serializable
class Object
trait Matchable
class Any

Value members

Constructors

def this(array: Array[Double])
def this(array: Array[Double], offset: Int, length: Int)

Concrete methods

override def collect[B](pf: PartialFunction[Double, B]): ArrayCursor[B]
Definition Classes
override def drop(n: Int): DoublesCursor
Definition Classes
override def filter(p: Double => Boolean): DoublesCursor
Definition Classes
override def hasNext(): Boolean
Definition Classes
override def map[B](f: Double => B): ArrayCursor[B]
Definition Classes
override def next(): Double
Definition Classes
Definition Classes
override def slice(from: Int, until: Int): DoublesCursor
Definition Classes
override def take(n: Int): DoublesCursor
Definition Classes
override def toIterator: Iterator[Double]
Definition Classes

Inherited methods

def foldLeft[R](initial: R)(op: (R, Double) => R): R

Applies a binary operator to a start value and all elements of this cursor, going left to right.

Applies a binary operator to a start value and all elements of this cursor, going left to right.

NOTE: applying this function on the cursor will consume it completely.

Type parameters:
R

is the result type of the binary operator.

Value parameters:
initial

is the start value.

op

the binary operator to apply

Returns:

the result of inserting op between consecutive elements of this cursor, going left to right with the start value initial on the left. Returns initial if the cursor is empty.

Inherited from:
BatchCursor

Returns true in case our cursor is empty or false if there are more elements to process.

Returns true in case our cursor is empty or false if there are more elements to process.

Alias for !cursor.hasNext().

Inherited from:
BatchCursor

Returns true in case our cursor has more elements to process or false if the cursor is empty.

Returns true in case our cursor has more elements to process or false if the cursor is empty.

Alias for hasNext.

Inherited from:
BatchCursor
def toArray[B >: Double : ClassTag]: Array[B]

Converts this cursor into an Array, consuming it in the process.

Converts this cursor into an Array, consuming it in the process.

Inherited from:
BatchCursor

Converts this cursor into a reusable array-backed Batch, consuming it in the process.

Converts this cursor into a reusable array-backed Batch, consuming it in the process.

Inherited from:
BatchCursor

Converts this cursor into a Scala immutable List, consuming it in the process.

Converts this cursor into a Scala immutable List, consuming it in the process.

Inherited from:
BatchCursor