sortedset

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

Variables

This section is empty.

Functions

This section is empty.

Types

type Set

type Set []*big.Int

func New

func New() Set

func (*Set) Bits

func (v *Set) Bits(subset Set) uint64

Bits creates a bit representation of the subset of a Set. The subset is passed by value

func (Set) Equal

func (v Set) Equal(other Set) bool

func (Set) IndexOf

func (v Set) IndexOf(b []byte) (int, bool)

func (*Set) Insert

func (v *Set) Insert(b []byte) bool

Insert a big.Int representation of a BLS key at a proper index (respectful of the VotingCommittee order). If the element is already in the VotingCommittee does nothing and returns false

func (Set) Intersect

func (v Set) Intersect(committeeSet uint64) Set

Intersect the bit representation of a VotingCommittee subset with the whole VotingCommittee set

func (Set) Len

func (v Set) Len() int

func (Set) Less

func (v Set) Less(i, j int) bool

func (*Set) Remove

func (v *Set) Remove(pubKeyBLS []byte) bool

Remove an entry from the set. Return false if the entry can't be found

func (Set) String

func (v Set) String() string

func (Set) Swap

func (v Set) Swap(i, j int)

func (Set) Whole

func (v Set) Whole() uint64

Jump to

Keyboard shortcuts

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