Documentation
¶
Index ¶
- Variables
- func FormatBase27[T Unsigned](tc TryteCore[T], a T) string
- func ParseBase27[T Unsigned](tc TryteCore[T], s string) (T, error)
- type BinaryFunc
- type Bt
- type Rand
- type Trit
- type Tryte16
- func (a Tryte16) Add(b Tryte16) (c Tryte16)
- func (a Tryte16) Compare(b Tryte16) int
- func (a Tryte16) Div(b Tryte16) Tryte16
- func (a Tryte16) Equal(b Tryte16) bool
- func (a Tryte16) IsZero() bool
- func (a Tryte16) Less(b Tryte16) bool
- func (a Tryte16) Mul(b Tryte16) Tryte16
- func (a Tryte16) Neg() (b Tryte16)
- func (a Tryte16) Shl(i int) Tryte16
- func (a Tryte16) Shr(i int) Tryte16
- func (a Tryte16) String() string
- func (a Tryte16) Sub(b Tryte16) (c Tryte16)
- func (a Tryte16) ToInt64() int64
- type Tryte32
- func (a Tryte32) Add(b Tryte32) (c Tryte32)
- func (a Tryte32) Compare(b Tryte32) int
- func (a Tryte32) Div(b Tryte32) Tryte32
- func (a Tryte32) Equal(b Tryte32) bool
- func (a Tryte32) IsZero() bool
- func (a Tryte32) Less(b Tryte32) bool
- func (a Tryte32) Mul(b Tryte32) Tryte32
- func (a Tryte32) Neg() (b Tryte32)
- func (a Tryte32) Shl(i int) Tryte32
- func (a Tryte32) Shr(i int) Tryte32
- func (a Tryte32) String() string
- func (a Tryte32) Sub(b Tryte32) (c Tryte32)
- func (a Tryte32) ToInt64() int64
- type Tryte4
- func (a Tryte4) Add(b Tryte4) (c Tryte4)
- func (a Tryte4) Compare(b Tryte4) int
- func (a Tryte4) Div(b Tryte4) Tryte4
- func (a Tryte4) Equal(b Tryte4) bool
- func (a Tryte4) IsZero() bool
- func (a Tryte4) Less(b Tryte4) bool
- func (a Tryte4) Mul(b Tryte4) Tryte4
- func (a Tryte4) Neg() (b Tryte4)
- func (a Tryte4) Shl(i int) Tryte4
- func (a Tryte4) Shr(i int) Tryte4
- func (a Tryte4) String() string
- func (a Tryte4) Sub(b Tryte4) (c Tryte4)
- func (a Tryte4) ToInt64() int64
- type Tryte6
- func (a Tryte6) Add(b Tryte6) (c Tryte6)
- func (a Tryte6) Compare(b Tryte6) int
- func (a Tryte6) Div(b Tryte6) Tryte6
- func (a Tryte6) Equal(b Tryte6) bool
- func (a Tryte6) IsZero() bool
- func (a Tryte6) Less(b Tryte6) bool
- func (a Tryte6) Mul(b Tryte6) Tryte6
- func (a Tryte6) Neg() (b Tryte6)
- func (a Tryte6) Shl(i int) Tryte6
- func (a Tryte6) Shr(i int) Tryte6
- func (a Tryte6) String() string
- func (a Tryte6) Sub(b Tryte6) (c Tryte6)
- func (a Tryte6) ToInt64() int64
- type Tryte8
- func (a Tryte8) Add(b Tryte8) (c Tryte8)
- func (a Tryte8) Compare(b Tryte8) int
- func (a Tryte8) Div(b Tryte8) Tryte8
- func (a Tryte8) Equal(b Tryte8) bool
- func (a Tryte8) IsZero() bool
- func (a Tryte8) Less(b Tryte8) bool
- func (a Tryte8) Mul(b Tryte8) Tryte8
- func (a Tryte8) Neg() (b Tryte8)
- func (a Tryte8) Shl(i int) Tryte8
- func (a Tryte8) Shr(i int) Tryte8
- func (a Tryte8) String() string
- func (a Tryte8) Sub(b Tryte8) (c Tryte8)
- func (a Tryte8) ToInt64() int64
- type Tryte9
- func (a Tryte9) Add(b Tryte9) (c Tryte9)
- func (a Tryte9) Compare(b Tryte9) int
- func (a Tryte9) Div(b Tryte9) Tryte9
- func (a Tryte9) Equal(b Tryte9) bool
- func (a Tryte9) IsZero() bool
- func (a Tryte9) Less(b Tryte9) bool
- func (a Tryte9) Mul(b Tryte9) Tryte9
- func (a Tryte9) Neg() (b Tryte9)
- func (a Tryte9) Shl(i int) Tryte9
- func (a Tryte9) Shr(i int) Tryte9
- func (a Tryte9) String() string
- func (a Tryte9) Sub(b Tryte9) (c Tryte9)
- func (a Tryte9) ToInt64() int64
- type TryteCore
- func (tc TryteCore[T]) Add(x, y T, carryIn Trit) (res T, carryOut Trit)
- func (tc TryteCore[T]) Compare(a, b T) int
- func (tc TryteCore[T]) DoBinary(a, b T, f BinaryFunc) T
- func (tc TryteCore[T]) DoUnary(a T, f UnaryFunc) T
- func (tc TryteCore[T]) Equal(a, b T) bool
- func (tc TryteCore[T]) Format(a T) string
- func (tc TryteCore[T]) FormatAllTrits(a T) string
- func (tc TryteCore[T]) Greater(a, b T) bool
- func (tc TryteCore[T]) GreaterOrEqual(a, b T) bool
- func (tc TryteCore[T]) Int64ToTrite(v int64) (a T, rest int64)
- func (tc TryteCore[T]) IsNegative(x T) bool
- func (tc TryteCore[T]) IsPositive(x T) bool
- func (tc TryteCore[T]) IsZero(x T) bool
- func (tc TryteCore[T]) Len(x T) int
- func (tc TryteCore[T]) Less(a, b T) bool
- func (tc TryteCore[T]) LessOrEqual(a, b T) bool
- func (tc TryteCore[T]) Limits() (min, max T)
- func (tc TryteCore[T]) LimitsInt64() (min, max int64)
- func (tc TryteCore[T]) Mul(a, b T) (hi, lo T)
- func (tc TryteCore[T]) MulLo(a, b T) (lo T)
- func (tc TryteCore[T]) MustParse(s string) T
- func (tc TryteCore[T]) Neg(a T) (b T)
- func (tc TryteCore[T]) Parse(s string) (T, error)
- func (tc TryteCore[T]) QuoRem(x, y T) (quo, rem T)
- func (tc TryteCore[T]) Rand(r *Rand) T
- func (tc TryteCore[T]) RandSh(r *Rand) T
- func (tc TryteCore[T]) SetAllTrits(t Trit) T
- func (tc TryteCore[T]) Shl(a T, i int) T
- func (tc TryteCore[T]) Shr(a T, i int) T
- func (tc TryteCore[T]) Sign(x T) int
- func (tc TryteCore[T]) Sub(x, y T, carryIn Trit) (res T, carryOut Trit)
- func (tc TryteCore[T]) ToInt64(a T) int64
- func (tc TryteCore[T]) TotalTrits() int
- func (tc TryteCore[T]) TryteToInt64(a T, rest int64) (int64, bool)
- type UnaryFunc
- type Unsigned
Constants ¶
This section is empty.
Variables ¶
View Source
var TC16 = tc16
View Source
var TC32 = tc32
View Source
var TC4 = tc4
View Source
var TC6 = tc6
View Source
var TC8 = tc8
View Source
var TC9 = tc9
Functions ¶
func FormatBase27 ¶
Types ¶
type BinaryFunc ¶
type TryteCore ¶
type TryteCore[T Unsigned] struct { // contains filtered or unexported fields }
func (TryteCore[T]) DoBinary ¶
func (tc TryteCore[T]) DoBinary(a, b T, f BinaryFunc) T
func (TryteCore[T]) FormatAllTrits ¶
func (TryteCore[T]) GreaterOrEqual ¶
The "greater than or equal to" sign: >= a >= b
func (TryteCore[T]) Int64ToTrite ¶
func (TryteCore[T]) Len ¶
Len returns the minimum number of trits required to represent x; the result is 0 for x == 0.
func (TryteCore[T]) LessOrEqual ¶
The "less than or equal to" sign: <= a <= b
func (TryteCore[T]) LimitsInt64 ¶
func (TryteCore[T]) SetAllTrits ¶
func (TryteCore[T]) TotalTrits ¶
TotalTrits returns the total number of trits.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.