vector

package
v0.0.0-...-fa3f174 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Copy

func Copy[T any](dest Vector[T], src Vector[T]) error

Types

type Vector

type Vector[T any] []T

func Collect

func Collect[T any](seq iter.Seq[T]) Vector[T]

func New

func New[T any]() Vector[T]

Constructors

func NewWithCapacity

func NewWithCapacity[T any](n int) Vector[T]

func NewWithElements

func NewWithElements[T any](elements []T) Vector[T]

func NewWithSize

func NewWithSize[T any](n int) Vector[T]

func (*Vector[T]) AppendSeq

func (v *Vector[T]) AppendSeq(seq iter.Seq[T])

func (Vector[T]) Backward

func (v Vector[T]) Backward() func(yield func(T) bool)

func (Vector[T]) Capacity

func (v Vector[T]) Capacity() int

func (*Vector[T]) Clear

func (v *Vector[T]) Clear()

func (Vector[T]) IsEmpty

func (v Vector[T]) IsEmpty() bool

func (*Vector[T]) PopBack

func (v *Vector[T]) PopBack()

func (*Vector[T]) PushBack

func (v *Vector[T]) PushBack(element T)

func (*Vector[T]) Remove

func (v *Vector[T]) Remove(i int)

func (*Vector[T]) Reserve

func (v *Vector[T]) Reserve(n int)

func (Vector[T]) Size

func (v Vector[T]) Size() int

Methods

func (Vector[T]) Values

func (v Vector[T]) Values() func(yield func(T) bool)

Jump to

Keyboard shortcuts

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