HDataType
A type representation.
Supports Float32
, Float64
, Complex32
and Complex64
types.
Methods
print()
source
Prints the HDataType
.
Differently from R’s behaviour, print
doesn’t return the value invisibly.
Examples
library(harmonium)
= HDataType$Complex64
dtype $print()
dtype
# or similarly:
print(dtype)
eq
eq(other: HDataType) -> bool
source
Equality with another HDataType
.
Arguments
other
An HDataType
.
Returns
A bool
.
Examples
library(harmonium)
= HDataType$Float32
hdatatype1 = HDataType$Float32
hdatatype2 $eq(hdatatype2) # TRUE
hdatatype1
# or similarly:
== hdatatype2 hdatatype1
ne
ne(other: HDataType) -> bool
source
Difference with another HDataType
.
Arguments
other
An HDataType
.
Returns
A bool
.
Examples
library(harmonium)
= HDataType$Float32
hdatatype1 = HDataType$Float64
hdatatype2 $ne(hdatatype2) # TRUE
hdatatype1
# or similarly:
!= hdatatype2 hdatatype1