data

package
v0.0.0-...-1be3379 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2025 License: BSD-2-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MapSlice

func MapSlice[T, U any](xs []T, f func(T) U) []U

Types

type Queue

type Queue[T any] struct {
	// contains filtered or unexported fields
}

func (*Queue[T]) Dequeue

func (q *Queue[T]) Dequeue() T

func (*Queue[T]) Enqueue

func (q *Queue[T]) Enqueue(x T)

func (*Queue[T]) Ready

func (q *Queue[T]) Ready() bool

type Set

type Set[T any] struct {
	// contains filtered or unexported fields
}

func NewSet

func NewSet[T any](cmp func(T, T) int) *Set[T]

func (*Set[T]) All

func (s *Set[T]) All() iter.Seq[T]

func (*Set[T]) Clone

func (s *Set[T]) Clone() *Set[T]

func (*Set[T]) Delete

func (s *Set[T]) Delete(x T)

func (*Set[T]) Get

func (s *Set[T]) Get(x T) (T, bool)

func (*Set[T]) Put

func (s *Set[T]) Put(x T)

func (*Set[T]) Size

func (s *Set[T]) Size() int

type SparseMatrix

type SparseMatrix[T any] struct {
	// contains filtered or unexported fields
}

func (*SparseMatrix[T]) AddRow

func (m *SparseMatrix[T]) AddRow(elements []SparseMatrixElement[T]) int

func (*SparseMatrix[T]) Copy

func (m *SparseMatrix[T]) Copy() *SparseMatrix[T]

func (*SparseMatrix[T]) LookupRow

func (m *SparseMatrix[T]) LookupRow(row int) []SparseMatrixElement[T]

func (*SparseMatrix[T]) LookupValue

func (m *SparseMatrix[T]) LookupValue(row, col int) (T, bool)

type SparseMatrixElement

type SparseMatrixElement[T any] struct {
	Col   int
	Value T
}

Jump to

Keyboard shortcuts

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