Byte.G.Math

abstract class Math[A <: Raw.Byte] extends Byte.G.Math.Ordering[A] with scala.math.Numeric[A]

Generic Math

Math is an implementation of scala.math.Numeric, an instance required for generic calculations on underlying type.

Source
Math.scala
trait scala.math.Numeric[A]
trait Math.Ordering[A]
trait scala.Ordering[A]
trait scala.math.PartialOrdering[A]
trait scala.math.Equiv[A]
trait java.io.Serializable
trait java.util.Comparator[A]
class java.lang.Object
trait scala.Matchable
class Any

Member

class NumericOps
Inherited from
Numeric
Inherited from
Ordering

Def

@scala.annotation.targetName("_join")
def +(c: scala.Ordering[A]): scala.Ordering[A]

Alias for join

Alias for join

Creates a new Ordering, which will order elements based on this Ordering, and if they appear equal, on joined Ordering

Inherited from
Ordering
Source
__.scala
def abs(x: A): A
Inherited from
Numeric
final override def compare(x: A, y: A): Int
Definition Classes
Ordering -> Ordering -> Ordering -> Comparator
Source
Math.scala
override def equiv(x: A, y: A): Boolean
Definition Classes
Ordering -> PartialOrdering -> Equiv
Inherited from
Ordering
def fromInt(x: Int): A
Inherited from
Numeric
override def gt(x: A, y: A): Boolean
Definition Classes
Ordering -> PartialOrdering
Inherited from
Ordering
override def gteq(x: A, y: A): Boolean
Definition Classes
Ordering -> PartialOrdering
Inherited from
Ordering
def isReverseOf(other: scala.Ordering[_]): Boolean
Inherited from
Ordering
def join(c: scala.Ordering[A]): scala.Ordering[A]

Join

Join

Creates a new Ordering, which will order elements based on this Ordering, and if they appear equal, on joined Ordering

Inherited from
Ordering
Source
__.scala
override def lt(x: A, y: A): Boolean
Definition Classes
Ordering -> PartialOrdering
Inherited from
Ordering
override def lteq(x: A, y: A): Boolean
Definition Classes
Ordering -> PartialOrdering
Inherited from
Ordering
def max[U <: A](x: U, y: U): U
Inherited from
Ordering
def min[U <: A](x: U, y: U): U
Inherited from
Ordering
def minus(x: A, y: A): A
Inherited from
Numeric
Inherited from
Numeric
Inherited from
Ordering
def negate(x: A): A
Inherited from
Numeric
override def on[U](f: U => A): scala.Ordering[U]

On type

On type

Creates an ordering on specified type. The mapping function from specified type to current type must be provided.

 val stringOrdering = Ordering[String]

 val intOrdering = stringOrdering.on[Int](i => i.toString)
Definition Classes
Ordering -> Ordering
Inherited from
Ordering
Source
__.scala
def one: A
Inherited from
Numeric
@scala.annotation.targetName("opt_View")
def opt_^(voidPosition: Int): scala.Ordering[Opt[A]]

Opt view

Opt view

Creates an ordering to sort Opt values of current type.

Inherited from
Ordering
Source
__.scala
def orElse(other: scala.Ordering[A]): scala.Ordering[A]
Inherited from
Ordering
def orElseBy[S](f: A => S)(ord: scala.Ordering[S]): scala.Ordering[A]
Inherited from
Ordering
def parseString(str: String): scala.Option[A]
Inherited from
Numeric
def plus(x: A, y: A): A
Inherited from
Numeric
@scala.annotation.targetName("rank_View")
def rank_^(fun: A => Int): scala.Ordering[A]

Ranked view

Ranked view

Creates an ordering, where all elements are first ordered on rank (defined with given function) and than on merit.

Inherited from
Ordering
Source
__.scala
override def reverse: Byte.G.Math.Ordering[A]

Reversed ordering

Reversed ordering

Returns ordering with reversed order

Definition Classes
Ordering -> Ordering -> Ordering -> PartialOrdering
Inherited from
Ordering
Source
Math.scala
def reversed(): java.util.Comparator[A]
Inherited from
Comparator
def sign(x: A): A
Inherited from
Numeric
@scala.deprecated("use `sign` method instead", "2.13.0")
def signum(x: A): Int
Deprecated
Inherited from
Numeric
def times(x: A, y: A): A
Inherited from
Numeric
def toDouble(x: A): Double
Inherited from
Numeric
def toFloat(x: A): Float
Inherited from
Numeric
def toInt(x: A): Int
Inherited from
Numeric
def toLong(x: A): Long
Inherited from
Numeric
def tryCompare(x: A, y: A): scala.Some[Int]
Inherited from
Ordering
@scala.annotation.targetName("voidFirst_View")
def voidFirst_^(using Given.VoidTag[A]): scala.Ordering[A]

Void first view

Void first view

Creates an ordering, where all void elements will come first.

Inherited from
Ordering
Source
__.scala
@scala.annotation.targetName("voidLast_View")
def voidLast_^(using Given.VoidTag[A]): scala.Ordering[A]

Void last view

Void last view

Creates an ordering, where all void elements will come last.

Inherited from
Ordering
Source
__.scala
def zero: A
Inherited from
Numeric

Implicit

Inherited from
Numeric
Inherited from
Ordering