data

package
v0.0.0-...-af7411b Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2024 License: BSD-3-Clause Imports: 2 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]) AddSet

func (s *Set[T]) AddSet(xs *Set[T])

func (*Set[T]) AddSlice

func (s *Set[T]) AddSlice(xs []T)

func (*Set[T]) Contains

func (s *Set[T]) Contains(x T) bool

func (*Set[T]) Copy

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

func (*Set[T]) Empty

func (s *Set[T]) Empty() bool

func (*Set[T]) Get

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

func (*Set[T]) Items

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

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