_Based

it.grypho.scala.leonardo.core._Based
See the_Based companion class
object _Based

Attributes

Companion
class
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
_Based.type

Members list

Type members

Inherited and Abstract types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Attributes

Inherited from:
Mirror

Value members

Concrete methods

def balancedDigits(n: Long): String

Balanced-ternary digits, using T for the digit -1.

Balanced-ternary digits, using T for the digit -1.

The digit set is {-1, 0, 1} — the same alphabet the symmetric ternary logic uses, which is why this base belongs in the library rather than being a bare utility.

Attributes

def digitsOf(n: Long, base: Int): String

Unsigned digit string of n in base, with a leading - for a negative value.

Unsigned digit string of n in base, with a leading - for a negative value.

Attributes

def of(value: Double, base: Int, balanced: Boolean): _Value

Builds a based integer, collapsing to a plain _Number when there is nothing to remember.

Builds a based integer, collapsing to a plain _Number when there is nothing to remember.

Base 10, a non-integral value, a non-finite one, or a base outside 2 .. 36 all yield a _Number: only a genuinely based integer becomes a _Based, exactly as _Truth.of collapses the crisp endpoints and _Complex.of collapses a zero imaginary part.

Attributes

def parseBalanced(s: String): Option[Long]

Parses a balanced-ternary digit string (T = -1), or None on an invalid digit.

Parses a balanced-ternary digit string (T = -1), or None on an invalid digit.

Attributes

def parseDigits(s: String, base: Int): Option[Long]

Parses a digit string in base, or None on an invalid digit.

Parses a digit string in base, or None on an invalid digit.

Attributes

Concrete fields

val MaxBase: Int
val MinBase: Int

Radix bounds: 2 is the smallest meaningful base, 36 exhausts 0-9A-Z.

Radix bounds: 2 is the smallest meaningful base, 36 exhausts 0-9A-Z.

Attributes