Back to godoc.org

Package uid

v0.7.0
Latest Go to latest

The latest major version is .

Published: Feb 26, 2020 | License: BSD-3-Clause | Module: gonum.org/v1/gonum

Overview

Package uid implements unique ID provision for graphs.

Index

Constants

const Max = int64(^uint64(0) >> 1)

Max is the maximum value of int64.

type Set

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

Set implements available ID storage.

func NewSet

func NewSet() Set

NewSet returns a new Set. The returned value should not be passed except by pointer.

func (*Set) NewID

func (s *Set) NewID() int64

NewID returns a new unique ID. The ID returned is not considered used until passed in a call to use.

func (*Set) Release

func (s *Set) Release(id int64)

Release frees the id for reuse.

func (*Set) Use

func (s *Set) Use(id int64)

Use adds the id to the used IDs in the Set.

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier