na

object na

na provides syntactic sugar for constructing primitives recognized as NA. A use case is be:

 Vec[Int](1,2,na,4)

na will implicitly convert to a primitive having the designated missing value bit pattern. That pattern is as follows:

  1. byte => Byte.MinValue
  2. char => Char.MinValue
  3. short => Short.Minvalue
  4. int => Int.MinValue
  5. long => Long.MinValue
  6. float => Float.NaN
  7. double => Double.NaN

The NA bit pattern for integral types is MinValue because it induces a symmetry on the remaining bound of values; e.g. the remaining Byte bound is (-127, +127).

Note since Booleans can only take on two values, it has no na primitive bit pattern.

class Object
trait Matchable
class Any
na.type

Value members

Concrete methods

def to[T](implicit fn: na.type => T): T

Generates a primitive missing value bit pattern.

Generates a primitive missing value bit pattern.

override def toString: String
Definition Classes
Any

Deprecated fields

@deprecated
val naToByte: na.type => Byte
Deprecated
@deprecated
val naToChar: na.type => Char
Deprecated
@deprecated
val naToDouble: na.type => Double
Deprecated
@deprecated
val naToFloat: na.type => Float
Deprecated
@deprecated
val naToInt: na.type => Int
Deprecated
@deprecated
val naToLong: na.type => Long
Deprecated
@deprecated
val naToShort: na.type => Short
Deprecated

Implicits

Implicits

implicit def naToByteConv(it: na.type): Byte
implicit def naToCharConv(it: na.type): Char
implicit def naToDoubleConv(it: na.type): Double
implicit def naToFloatConv(it: na.type): Float
implicit def naToIntConv(it: na.type): Int
implicit def naToLongConv(it: na.type): Long
implicit def naToShortConv(it: na.type): Short