vector

package
v0.42.0 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2024 License: MIT Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Accumulator

type Accumulator struct {
	Buf [32 + 8]byte // leave 8 bytes at the end as a slack for use in GetFingerprint append()
}

func (*Accumulator) AddAccumulator

func (acc *Accumulator) AddAccumulator(other Accumulator)

func (*Accumulator) AddBytes

func (acc *Accumulator) AddBytes(other []byte)

func (*Accumulator) GetFingerprint

func (acc *Accumulator) GetFingerprint(n int) string

func (*Accumulator) Reset

func (acc *Accumulator) Reset()

type Vector

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

func New

func New() *Vector

func (*Vector) FindLowerBound

func (v *Vector) FindLowerBound(begin, end int, bound negentropy.Bound) int

func (*Vector) Fingerprint

func (v *Vector) Fingerprint(begin, end int) string

func (*Vector) GetBound

func (v *Vector) GetBound(idx int) negentropy.Bound

func (*Vector) Insert

func (v *Vector) Insert(createdAt nostr.Timestamp, id string)

func (*Vector) Range

func (v *Vector) Range(begin, end int) iter.Seq2[int, negentropy.Item]

func (*Vector) Seal

func (v *Vector) Seal()

func (*Vector) Size

func (v *Vector) Size() int

Jump to

Keyboard shortcuts

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