Packages

  • package root
    Definition Classes
    root
  • package scalation

    The scalation package specifies system-wide constants for directory paths.

    The scalation package specifies system-wide constants for directory paths. Sub-packages may wish to define 'BASE-DIR = DATA_DIR + ⁄ + <package>' in their own 'package.scala' files. For maintainability, directory paths should only be specified in 'package.scala' files.

    Definition Classes
    root
  • package math

    The math package contains classes, traits and objects for common mathematical operations.

    The math package contains classes, traits and objects for common mathematical operations. Its package object defines exponentiation, logarithmic, trigonometric, etc. operators and functions.

    Definition Classes
    scalation
  • object TimeO

    The TimeO object is used to represent and operate on date-time values.

    The TimeO object is used to represent and operate on date-time values. It contains an implicit class definition for TimeNum, which extends Instant with Numeric operations that can be used in VectorT. The java.time.Instant class stores nano-seconds since the UNIX Epoch using a long for seconds and int for nano-seconds (12 bytes or 96 bits). The java.time.ZonedDateTime class is used with it to handle various date-time formats.

    Definition Classes
    math
  • TimeNum

implicit class TimeNum extends Numeric[TimeNum] with Ordered[TimeNum] with Serializable

The TimeNum implicit class is used to represent and operate on date-time numbers. Internally, a date-time number is represented as Instant. ---------------------------------------------------------------------

Linear Supertypes
Ordered[TimeNum], Comparable[TimeNum], Numeric[TimeNum], Ordering[TimeNum], PartialOrdering[TimeNum], Equiv[TimeNum], Serializable, Serializable, Comparator[TimeNum], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. TimeNum
  2. Ordered
  3. Comparable
  4. Numeric
  5. Ordering
  6. PartialOrdering
  7. Equiv
  8. Serializable
  9. Serializable
  10. Comparator
  11. AnyRef
  12. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new TimeNum(dt: String, dtPattern: String = DEFAULT_DATETIME_FORMAT)

    Construct a TimeNum object from the given date-time by creating a ZonedDateTime from the string and converting it to the corresponding Instant, the underlying type of TimeNum class.

    Construct a TimeNum object from the given date-time by creating a ZonedDateTime from the string and converting it to the corresponding Instant, the underlying type of TimeNum class. Format it using 'dtPattern'.

    dt

    the given date-time as a string

    dtPattern

    the given date-time pattern/format

  2. new TimeNum(dt: ZonedDateTime)

    Construct a TimeNum object from the given date-time by taking a ZonedDateTime and converting it to the corresponding Instant, the underlying type of TimeNum class.

    Construct a TimeNum object from the given date-time by taking a ZonedDateTime and converting it to the corresponding Instant, the underlying type of TimeNum class.

    dt

    the given date-time

  3. new TimeNum(inst: Instant)

    inst

    the underlying Instant of time

Type Members

  1. class Ops extends AnyRef
    Definition Classes
    Numeric

Value Members

  1. def !=~(t: TimeNum): Boolean

    Return whether two TimeNum numbers not are nearly equal.

    Return whether two TimeNum numbers not are nearly equal.

    t

    compare this with t

  2. def *(t: TimeNum): TimeNum

    Multiply 'this' TimeNum and TimeNum 't'.

    Multiply 'this' TimeNum and TimeNum 't'.

    t

    the TimeNum that multiplies this

  3. def +(t: TimeNum): TimeNum

    Add 'this' TimeNum and TimeNum 't'.

    Add 'this' TimeNum and TimeNum 't'. The seconds and nanoseconds are added separately, with carry from nanoseconds handled.

    t

    the TimeNum to add to this

  4. def -(t: TimeNum): TimeNum

    Subtract TimeNum 't' from 'this' TimeNum.

    Subtract TimeNum 't' from 'this' TimeNum.

    t

    the TimeNum to subtract from this

  5. def /(t: TimeNum): TimeNum

    Divide 'this' TimeNum by TimeNum 't'.

    Divide 'this' TimeNum by TimeNum 't'.

    t

    the TimeNum that divides this

  6. def <(that: TimeNum): Boolean
    Definition Classes
    Ordered
  7. def <=(that: TimeNum): Boolean
    Definition Classes
    Ordered
  8. def =~(t: TimeNum): Boolean

    Return whether two TimeNum numbers are nearly equal.

    Return whether two TimeNum numbers are nearly equal.

    t

    the TimeNum to compare with this

  9. def >(that: TimeNum): Boolean
    Definition Classes
    Ordered
  10. def >=(that: TimeNum): Boolean
    Definition Classes
    Ordered
  11. def abs(x: TimeNum): TimeNum
    Definition Classes
    Numeric
  12. def compare(s: TimeNum, t: TimeNum): Int

    Compare two 'TimeNum numbers (negative for <, zero for ==, positive for >).

    Compare two 'TimeNum numbers (negative for <, zero for ==, positive for >).

    s

    the first TimeNum number

    t

    the second TimeNum number

    Definition Classes
    TimeNum → Ordering → Comparator
  13. def compare(t: TimeNum): Int

    Compare two TimeNum numbers (negative for <, zero for ==, positive for >).

    Compare two TimeNum numbers (negative for <, zero for ==, positive for >).

    t

    the TimeNum number to compare with this

    Definition Classes
    TimeNum → Ordered
  14. def compareTo(that: TimeNum): Int
    Definition Classes
    Ordered → Comparable
  15. def divide(s: TimeNum, t: TimeNum): TimeNum
  16. def equals(t: Any): Boolean

    Override equals to determine whether 'this' date-time number equals date-time 't'.

    Override equals to determine whether 'this' date-time number equals date-time 't'.

    t

    the date-time number to compare with this

    Definition Classes
    TimeNum → Comparator → AnyRef → Any
  17. def equiv(x: TimeNum, y: TimeNum): Boolean
    Definition Classes
    Ordering → PartialOrdering → Equiv
  18. def fromDouble(d: Double): TimeNum

    Create a TimeNum number from a Double, where the seconds are extracted from the whole number part and the nanoseconds from the fractional part.

    Create a TimeNum number from a Double, where the seconds are extracted from the whole number part and the nanoseconds from the fractional part.

    d

    the source double

  19. def fromInt(n: Int): TimeNum

    Create a TimeNum number from an Int.

    Create a TimeNum number from an Int.

    n

    the source integer

    Definition Classes
    TimeNum → Numeric
  20. def getChrono(chrono: ChronoField, zone: ZoneId = ZoneOffset.UTC): Long

    Get a temporal aspect (e.g., month, week, day, hour, ...)

    Get a temporal aspect (e.g., month, week, day, hour, ...)

    chrono

    the enumeration type specifying the aspect to return

    See also

    docs.oracle.com/javase/8/docs/api/java/time/temporal/ChronoField.html Currently only four (INSTANT_SECONDS, MICRO_OF_SECOND, MILLI_OF_SECOND, NANO_OF_SECOND) of the enumeration values are implemented, but ScalaTion adds five more (see below).

  21. def gt(x: TimeNum, y: TimeNum): Boolean
    Definition Classes
    Ordering → PartialOrdering
  22. def gteq(x: TimeNum, y: TimeNum): Boolean
    Definition Classes
    Ordering → PartialOrdering
  23. def hashCode(): Int

    Must also override hashCode to be compatible with equals.

    Must also override hashCode to be compatible with equals.

    Definition Classes
    TimeNum → AnyRef → Any
  24. def in(set: Set[TimeNum]): Boolean

    Determine whether 'this' is in the given set.

  25. def in(lim: (TimeNum, TimeNum)): Boolean

    Determine whether 'this' is within the given bounds

    Determine whether 'this' is within the given bounds

    lim

    the given (lower, upper) bounds

  26. val inst: Instant
  27. def lt(x: TimeNum, y: TimeNum): Boolean
    Definition Classes
    Ordering → PartialOrdering
  28. def lteq(x: TimeNum, y: TimeNum): Boolean
    Definition Classes
    Ordering → PartialOrdering
  29. def max(t: TimeNum): TimeNum

    Return the maximum of 'this' and 't' TimeNum numbers.

    Return the maximum of 'this' and 't' TimeNum numbers.

    t

    the TimeNum number to compare with this

  30. def max(x: TimeNum, y: TimeNum): TimeNum
    Definition Classes
    Ordering
  31. def min(t: TimeNum): TimeNum

    Return the minimum of 'this' and 't' TimeNum numbers.

    Return the minimum of 'this' and 't' TimeNum numbers.

    t

    the TimeNum number to compare with this

  32. def min(x: TimeNum, y: TimeNum): TimeNum
    Definition Classes
    Ordering
  33. def minus(s: TimeNum, t: TimeNum): TimeNum
    Definition Classes
    TimeNum → Numeric
  34. implicit def mkNumericOps(lhs: TimeNum): Ops
    Definition Classes
    Numeric
  35. implicit def mkOrderingOps(lhs: TimeNum): TimeNum.Ops
    Definition Classes
    Ordering
  36. def negate(s: TimeNum): TimeNum
    Definition Classes
    TimeNum → Numeric
  37. def not_in(set: Set[TimeNum]): Boolean

    Determine whether 'this' is not in the given set.

  38. def not_in(lim: (TimeNum, TimeNum)): Boolean

    Determine whether 'this' is not within the given bounds

    Determine whether 'this' is not within the given bounds

    lim

    the given (lower, upper) bounds

  39. def on[U](f: (U) ⇒ TimeNum): Ordering[U]
    Definition Classes
    Ordering
  40. def one: TimeNum
    Definition Classes
    Numeric
  41. def plus(s: TimeNum, t: TimeNum): TimeNum
    Definition Classes
    TimeNum → Numeric
  42. def reverse: Ordering[TimeNum]
    Definition Classes
    Ordering → PartialOrdering
  43. def reversed(): Comparator[TimeNum]
    Definition Classes
    Comparator
  44. def signum(x: TimeNum): Int
    Definition Classes
    Numeric
  45. def thenComparing[U <: Comparable[_ >: U]](arg0: Function[_ >: TimeNum, _ <: U]): Comparator[TimeNum]
    Definition Classes
    Comparator
  46. def thenComparing[U](arg0: Function[_ >: TimeNum, _ <: U], arg1: Comparator[_ >: U]): Comparator[TimeNum]
    Definition Classes
    Comparator
  47. def thenComparing(arg0: Comparator[_ >: TimeNum]): Comparator[TimeNum]
    Definition Classes
    Comparator
  48. def thenComparingDouble(arg0: ToDoubleFunction[_ >: TimeNum]): Comparator[TimeNum]
    Definition Classes
    Comparator
  49. def thenComparingInt(arg0: ToIntFunction[_ >: TimeNum]): Comparator[TimeNum]
    Definition Classes
    Comparator
  50. def thenComparingLong(arg0: ToLongFunction[_ >: TimeNum]): Comparator[TimeNum]
    Definition Classes
    Comparator
  51. def times(s: TimeNum, t: TimeNum): TimeNum
    Definition Classes
    TimeNum → Numeric
  52. def toDouble: Double
  53. def toDouble(t: TimeNum): Double

    Convert the given TimeNum number to a Double.

    Convert the given TimeNum number to a Double.

    t

    that date-time number to convert

    Definition Classes
    TimeNum → Numeric
  54. def toFloat: Float
  55. def toFloat(t: TimeNum): Float

    Convert 'this' TimeNum number to a Float.

    Convert 'this' TimeNum number to a Float.

    t

    that date-time number to convert

    Definition Classes
    TimeNum → Numeric
  56. def toInt: Int
  57. def toInt(t: TimeNum): Int

    Convert 'this' TimeNum number to an Int.

    Convert 'this' TimeNum number to an Int.

    t

    that date-time number to convert

    Definition Classes
    TimeNum → Numeric
  58. def toLong: Long
  59. def toLong(t: TimeNum): Long

    Convert 'this' TimeNum number to a Long.

    Convert 'this' TimeNum number to a Long.

    t

    that date-time number to convert

    Definition Classes
    TimeNum → Numeric
  60. def toString(): String

    Convert 'this' date-time number to a String.

    Convert 'this' date-time number to a String.

    Definition Classes
    TimeNum → AnyRef → Any
  61. def toString2(format: String = DEFAULT_DATETIME_FORMAT): String

    Convert 'this' date time number to a String in the format specified by the user, use 'DEFAULT_DATETIME_FORMAT' if user does not specify any format.

    Convert 'this' date time number to a String in the format specified by the user, use 'DEFAULT_DATETIME_FORMAT' if user does not specify any format.

    format

    the format to be used

  62. def toTimeNum: TimeNum

    Convert 'this' date-time number to a TimeNum.

  63. def tryCompare(x: TimeNum, y: TimeNum): Some[Int]
    Definition Classes
    Ordering → PartialOrdering
  64. def unary_-(): TimeNum

    Compute the unary minus (-).

  65. lazy val val1: Long

    General alias for the parts of a time number

  66. lazy val val2: Int

    General alias for the parts of a time number

  67. def zero: TimeNum
    Definition Classes
    Numeric
  68. def ~^(t: TimeNum): TimeNum

    Raise 'this' TimeNum to power TimeNum 't'.

    Raise 'this' TimeNum to power TimeNum 't'.

    t

    the TimeNum that raises this

  69. def (t: TimeNum): TimeNum
  70. def (set: Set[TimeNum]): Boolean
  71. def (lim: (TimeNum, TimeNum)): Boolean
  72. def (set: Set[TimeNum]): Boolean
  73. def (lim: (TimeNum, TimeNum)): Boolean
  74. def (t: TimeNum): Boolean
  75. def (t: TimeNum): Boolean
  76. def (t: TimeNum): Boolean

    Compare 'this' TimeNum number with that date-time number 't' for inequality.

    Compare 'this' TimeNum number with that date-time number 't' for inequality.

    t

    that TimeNum number

  77. def (t: TimeNum): Boolean

    Compare 'this' TimeNum number with that date-time number 't' for less than or equal to.

    Compare 'this' TimeNum number with that date-time number 't' for less than or equal to.

    t

    that TimeNum number

  78. def (t: TimeNum): Boolean

    Compare 'this' TimeNum number with that date-time number 't' for greater than or equal to.

    Compare 'this' TimeNum number with that date-time number 't' for greater than or equal to.

    t

    that TimeNum number