Object/Trait

typequux

Dense

Related Docs: trait Dense | package typequux

Permalink

object Dense

Contains implementation for Dense and typeconstructor aliases that make usage more pleasant

The operations can be shown to satisfy:

1. Additive commutativity: +[A, B] =:= +[B, A]

2. Additive associativity: +[A, +[B, C]] =:= +[+[A, B], C]

3. Additive identity: +[A, _0] =:= A =:= +[_0, A]

4. Multiplicative commutativity: *[A, B] =:= *[B, A]

5. Multiplicative associativity: *[A, *[B, C]] =:= *[*[A, B], C]

6. Multiplicative identity: *[A, _1] =:= A =:= *[_1, A]

7. Distributivity: *[A, +[B, C]] =:= +[*[A, B], *[A, C]]

8. Zero exponent: ^[A, _0] =:= _1

9. One exponent: ^[_1, A] =:= _1

10. Exponent Identity: ^[A, _1] =:= A

11. Exponent combination 1: *[^[A, B], ^[A, C]] =:= ^[A, *[B, C]]

12. Exponent combination 2: ^[^[A, B], C] =:= ^[A, *[B, C]]

13. Exponent combination 3: ^[*[A, B], C] =:= *[^[A, C], ^[B, C]]

14. Total Order

Author:

Harshad Deo

Since

0.1

Linear Supertypes
Ordering
  1. Grouped
  2. Alphabetic
  3. By Inheritance
Inherited
  1. Dense
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. type *[A <: Dense, B <: Dense] = Dense.*.B.Match[Dense._57.type.Karatsuba[B, DNil], DNil, Dense] forSome {val _57: A}

    Permalink

    Alias for multiplying two dense numbers

    Alias for multiplying two dense numbers

    Author:

    Harshad Deo

    Since

    0.1

  2. type +[A <: Dense, B <: Dense] = Dense.+.A.Add[B]

    Permalink

    Alias for adding two dense number

    Alias for adding two dense number

    Author:

    Harshad Deo

    Since

    0.1

  3. type ::[H <: Digit, T <: Dense] = DCons[H, T]

    Permalink

    Builds a new dense number by consing a bit to an existing dense number.

    Builds a new dense number by consing a bit to an existing dense number. The consed bit is the lowest priority bit in the resulting number

    Author:

    Harshad Deo

    Since

    0.1

  4. type <[A <: Dense, B <: Dense] = Dense.CompareC.Match[True, False, False, Bool]

    Permalink

    Alias for checking if the first dense number is less than the second

    Alias for checking if the first dense number is less than the second

    Author:

    Harshad Deo

    Since

    0.1

  5. type <=[A <: Dense, B <: Dense] = Dense.CompareC.Match[True, True, False, Bool]

    Permalink

    Alias for checking whether the first dense number is less than or equal to the second

    Alias for checking whether the first dense number is less than or equal to the second

    Author:

    Harshad Deo

    Since

    0.1

  6. type ===[A <: Dense, B <: Dense] = Dense.CompareC.Match[False, True, False, Bool]

    Permalink

    Alias for checking if two dense numbers are equal

    Alias for checking if two dense numbers are equal

    Author:

    Harshad Deo

    Since

    0.1

  7. type >[A <: Dense, B <: Dense] = Dense.CompareC.Match[False, False, True, Bool]

    Permalink

    Alias for checking whether the first dense number is greater than the second

    Alias for checking whether the first dense number is greater than the second

    Author:

    Harshad Deo

    Since

    0.1

  8. type >=[A <: Dense, B <: Dense] = Dense.CompareC.Match[False, True, True, Bool]

    Permalink

    Alias for checking whether the first dense number is greater than or equal to the second

    Alias for checking whether the first dense number is greater than or equal to the second

    Author:

    Harshad Deo

    Since

    0.1

  9. type Compare[A <: Dense, B <: Dense] = Dense.Compare.A.CompareC[B, EQ]

    Permalink

    Alias for comparing to dense numbers

    Alias for comparing to dense numbers

    Author:

    Harshad Deo

    Since

    0.1

  10. final class D0 extends Digit

    Permalink

    Represents a 0 in the dense encoding of a natural number

    Represents a 0 in the dense encoding of a natural number

    Author:

    Harshad Deo

    Since

    0.1

  11. final class D1 extends Digit

    Permalink

    Represents a 1 in the dense encoding of a natural number

    Represents a 1 in the dense encoding of a natural number

    Author:

    Harshad Deo

    Since

    0.1

  12. final class DCons[d <: Digit, T <: Dense] extends Dense

    Permalink

    Non-zero dense number.

    Non-zero dense number. The digit is the least significant bit

    Author:

    Harshad Deo

    d

    Lowest priority bit

    T

    Rest of the bits, in decreasing order of priority

    Since

    0.1

  13. final class DNil extends Dense

    Permalink

    Dense Zero

    Dense Zero

    Author:

    Harshad Deo

    Since

    0.1

  14. final class DenseIntRep[D] extends AnyVal

    Permalink

    Builds a value level scala.Int representation of a dense type

    Builds a value level scala.Int representation of a dense type

    Author:

    Harshad Deo

    D

    Type to be converted to a value

    Since

    0.3.1

  15. final class DenseRep[D <: Dense] extends AnyVal

    Permalink

    Builds a value level scala.Long representation of a dense type.

    Builds a value level scala.Long representation of a dense type.

    Author:

    Harshad Deo

    D

    Type to be converted to a value

    Since

    0.1

  16. sealed trait Digit extends AnyRef

    Permalink

    Represents a digit in the dense encoding of a natural number

    Represents a digit in the dense encoding of a natural number

    Author:

    Harshad Deo

    Since

    0.1

  17. type Max[A <: Dense, B <: Dense] = Dense.CompareC.Match[B, A, A, Dense]

    Permalink

    Alias for determing the greatest of two dense numbers

    Alias for determing the greatest of two dense numbers

    Author:

    Harshad Deo

    Since

    0.1

  18. type Min[A <: Dense, B <: Dense] = Dense.CompareC.Match[A, A, B, Dense]

    Permalink

    Alias for determining the lease of two dense numbers

    Alias for determining the lease of two dense numbers

    Author:

    Harshad Deo

    Since

    0.1

  19. type Sq[A <: Dense] = Dense.Sq.A.Sq

    Permalink

    Alias for squaring a dense number.

    Alias for squaring a dense number. Makes the code more pleasant to read

    Author:

    Harshad Deo

    Since

    0.1

  20. type ^[A <: Dense, B <: Dense] = Dense.^.B.ExpHelper[A, DCons[D1, DNil]]

    Permalink

    Alias for raising the first Dense number to the power of the second

    Alias for raising the first Dense number to the power of the second

    Author:

    Harshad Deo

    Since

    0.1

  21. type _0 = DNil

    Permalink

    Dense 0

    Dense 0

    Author:

    Harshad Deo

    Since

    0.1

  22. type _1 = DCons[D1, DNil]

    Permalink

    Dense 1

    Dense 1

    Author:

    Harshad Deo

    Since

    0.1

  23. type _10 = DCons[D0, ::[D1, ::[D0, ::[D1, DNil]]]]

    Permalink

    Dense 10

    Dense 10

    Author:

    Harshad Deo

    Since

    0.1

  24. type _11 = DCons[D1, ::[D1, ::[D0, ::[D1, DNil]]]]

    Permalink

    Dense 11

    Dense 11

    Author:

    Harshad Deo

    Since

    0.1

  25. type _12 = DCons[D0, ::[D0, ::[D1, ::[D1, DNil]]]]

    Permalink

    Dense 12

    Dense 12

    Author:

    Harshad Deo

    Since

    0.1

  26. type _13 = DCons[D1, ::[D0, ::[D1, ::[D1, DNil]]]]

    Permalink

    Dense 13

    Dense 13

    Author:

    Harshad Deo

    Since

    0.1

  27. type _14 = DCons[D0, ::[D1, ::[D1, ::[D1, DNil]]]]

    Permalink

    Dense 14

    Dense 14

    Author:

    Harshad Deo

    Since

    0.1

  28. type _15 = DCons[D1, ::[D1, ::[D1, ::[D1, DNil]]]]

    Permalink

    Dense 15

    Dense 15

    Author:

    Harshad Deo

    Since

    0.1

  29. type _16 = DCons[D0, ::[D0, ::[D0, ::[D0, ::[D1, DNil]]]]]

    Permalink

    Dense 16

    Dense 16

    Author:

    Harshad Deo

    Since

    0.1

  30. type _17 = DCons[D1, ::[D0, ::[D0, ::[D0, ::[D1, DNil]]]]]

    Permalink

    Dense 17

    Dense 17

    Author:

    Harshad Deo

    Since

    0.1

  31. type _18 = DCons[D0, ::[D1, ::[D0, ::[D0, ::[D1, DNil]]]]]

    Permalink

    Dense 18

    Dense 18

    Author:

    Harshad Deo

    Since

    0.1

  32. type _19 = DCons[D1, ::[D1, ::[D0, ::[D0, ::[D1, DNil]]]]]

    Permalink

    Dense 19

    Dense 19

    Author:

    Harshad Deo

    Since

    0.1

  33. type _2 = DCons[D0, ::[D1, DNil]]

    Permalink

    Dense 2

    Dense 2

    Author:

    Harshad Deo

    Since

    0.1

  34. type _20 = DCons[D0, ::[D0, ::[D1, ::[D0, ::[D1, DNil]]]]]

    Permalink

    Dense 20

    Dense 20

    Author:

    Harshad Deo

    Since

    0.1

  35. type _21 = DCons[D1, ::[D0, ::[D1, ::[D0, ::[D1, DNil]]]]]

    Permalink

    Dense 21

    Dense 21

    Author:

    Harshad Deo

    Since

    0.1

  36. type _22 = DCons[D0, ::[D1, ::[D1, ::[D0, ::[D1, DNil]]]]]

    Permalink

    Dense 22

    Dense 22

    Author:

    Harshad Deo

    Since

    0.1

  37. type _3 = DCons[D1, ::[D1, DNil]]

    Permalink

    Dense 3

    Dense 3

    Author:

    Harshad Deo

    Since

    0.1

  38. type _4 = DCons[D0, ::[D0, ::[D1, DNil]]]

    Permalink

    Dense 4

    Dense 4

    Author:

    Harshad Deo

    Since

    0.1

  39. type _5 = DCons[D1, ::[D0, ::[D1, DNil]]]

    Permalink

    Dense 5

    Dense 5

    Author:

    Harshad Deo

    Since

    0.1

  40. type _6 = DCons[D0, ::[D1, ::[D1, DNil]]]

    Permalink

    Dense 6

    Dense 6

    Author:

    Harshad Deo

    Since

    0.1

  41. type _7 = DCons[D1, ::[D1, ::[D1, DNil]]]

    Permalink

    Dense 7

    Dense 7

    Author:

    Harshad Deo

    Since

    0.1

  42. type _8 = DCons[D0, ::[D0, ::[D0, ::[D1, DNil]]]]

    Permalink

    Dense 8

    Dense 8

    Author:

    Harshad Deo

    Since

    0.1

  43. type _9 = DCons[D1, ::[D0, ::[D0, ::[D1, DNil]]]]

    Permalink

    Dense 9

    Dense 9

    Author:

    Harshad Deo

    Since

    0.1

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. object DenseIntRep

    Permalink

    Contains implicit definitional to build a value level representation of a dense type as a scala.Int

    Contains implicit definitional to build a value level representation of a dense type as a scala.Int

    Author:

    Harshad Deo

    Since

    0.3.1

  5. object DenseRep

    Permalink

    Contains implicit definitions to build the value level representation of a dense type as a scala.Long

    Contains implicit definitions to build the value level representation of a dense type as a scala.Long

    Author:

    Harshad Deo

    Since

    0.1

  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  12. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  13. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  14. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  15. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  16. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  17. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  18. def toInt[D <: Dense](implicit dr: DenseIntRep[D]): Int

    Permalink

    Builds value level representation of a Dense as a scala.Int

    Builds value level representation of a Dense as a scala.Int

    Author:

    Harshad Deo

    D

    Dense type to be converted to a value

    Since

    0.3.1

  19. def toLong[D <: Dense](implicit dr: DenseRep[D]): Long

    Permalink

    Builds value level representation of a Dense as a scala.Long

    Builds value level representation of a Dense as a scala.Long

    Author:

    Harshad Deo

    D

    Dense type to be converted to a value

    Since

    0.1

  20. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  21. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Implementation

Number aliases

Operations

Ungrouped