Documentation ¶
Overview ¶
Package bigint implements utilities for dealing with arbitrary precision integers.
Index ¶
- func FormatSlice(s []*big.Int) string
- func ToInt(x *big.Int) (int, bool)
- func ToInt32(x *big.Int) (int32, bool)
- func ToInt64(x *big.Int) (int64, bool)
- func ToRune(x *big.Int) rune
- func ToUint(x *big.Int) (uint, bool)
- func ToUint32(x *big.Int) (uint32, bool)
- func ToUint64(x *big.Int) (uint64, bool)
- type Map
- func (m *Map) Get(key *big.Int) (interface{}, bool)
- func (m *Map) GetOrPut(key *big.Int, v interface{}) (interface{}, bool)
- func (m *Map) GetOrPutPair(key *big.Int, v interface{}) (MapPair, bool)
- func (m *Map) GetPair(key *big.Int) (MapPair, bool)
- func (m *Map) Has(key *big.Int) bool
- func (m Map) Len() int
- func (m *Map) Pairs() []MapPair
- func (m *Map) Put(key *big.Int, v interface{}) bool
- func (m Map) String() string
- type MapPair
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatSlice ¶
FormatSlice formats a slice of *big.Int to a space separated string.
func ToInt ¶
ToInt converts a *big.Int x to an int and returns whether x can be contained within int.
func ToInt32 ¶
ToInt32 converts a *big.Int to an int32 and returns whether x can be contained within int32.
func ToInt64 ¶
ToInt64 converts a *big.Int to an int64 and returns whether x can be contained within int64.
func ToRune ¶
ToRune converts a *big.Int x to a rune. When x is not a valid UTF-8 codepoint, U+FFFD � replacement character is returned.
func ToUint ¶
ToUint converts a *big.Int x to a uint and returns whether x can be contained within uint.
Types ¶
type Map ¶
type Map struct {
// contains filtered or unexported fields
}
Map is a hash table for big int keys. Keys are not copied and must not be changed after insertion.
func (*Map) GetOrPut ¶
GetOrPut gets the value at the key, if it exists, or otherwise puts a value at the key.
func (*Map) GetOrPutPair ¶
GetOrPutPair gets the key-value pair at the key, if it exists, or otherwise puts a value at the key.