pot

package
v0.0.0-...-b78b3a4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 16, 2019 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultPof

func DefaultPof(max int) func(one, other Val, pos int) (int, bool)

func Label

func Label(v Val) string

func NewAddressFromString

func NewAddressFromString(s string) []byte

func ProxCmp

func ProxCmp(a, x, y interface{}) int

func ToBin

func ToBin(a []byte) string

func ToBytes

func ToBytes(v Val) []byte

Types

type Address

type Address common.Hash

func NewAddressFromBytes

func NewAddressFromBytes(b []byte) Address

func RandomAddress

func RandomAddress() Address

func RandomAddressAt

func RandomAddressAt(self Address, prox int) (addr Address)

func (Address) Bin

func (a Address) Bin() string

func (Address) Bytes

func (a Address) Bytes() []byte

func (Address) IsZero

func (a Address) IsZero() bool

func (*Address) MarshalJSON

func (a *Address) MarshalJSON() (out []byte, err error)

func (Address) String

func (a Address) String() string

func (*Address) UnmarshalJSON

func (a *Address) UnmarshalJSON(value []byte) error

type BytesAddress

type BytesAddress interface {
	Address() []byte
}

type Pof

type Pof func(Val, Val, int) (int, bool)

type Pot

type Pot struct {
	// contains filtered or unexported fields
}

func Add

func Add(t *Pot, val Val, pof Pof) (*Pot, int, bool)

func NewPot

func NewPot(v Val, po int) *Pot

func Remove

func Remove(t *Pot, v Val, pof Pof) (*Pot, int, bool)

func Swap

func Swap(t *Pot, k Val, pof Pof, f func(v Val) Val) (r *Pot, po int, found bool, change bool)

func Union

func Union(t0, t1 *Pot, pof Pof) (*Pot, int)

func (*Pot) Each

func (t *Pot) Each(f func(Val, int) bool) bool

func (*Pot) EachBin

func (t *Pot) EachBin(val Val, pof Pof, po int, f func(int, int, func(func(val Val, i int) bool) bool) bool)

func (*Pot) EachFrom

func (t *Pot) EachFrom(f func(Val, int) bool, po int) bool

func (*Pot) EachNeighbour

func (t *Pot) EachNeighbour(val Val, pof Pof, f func(Val, int) bool) bool

func (*Pot) EachNeighbourAsync

func (t *Pot) EachNeighbourAsync(val Val, pof Pof, max int, maxPos int, f func(Val, int), wait bool)

func (*Pot) Pin

func (t *Pot) Pin() Val

func (*Pot) Size

func (t *Pot) Size() int

func (*Pot) String

func (t *Pot) String() string

type Val

type Val interface{}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL