vector

package
v0.0.0-...-972597a Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2024 License: Unlicense Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Apply1

func Apply1[T any](
	xs Vector[T],
	n uintptr,
	fn func(x T) T,
)

func Apply1To

func Apply1To[T any](
	dst, xs Vector[T],
	n uintptr, fn func(x T) T,
)

func Apply2

func Apply2[T any](
	xs, ys Vector[T],
	n uintptr,
	fn func(x, y T) T,
)

func Apply2To

func Apply2To[T any](
	dst, xs, ys Vector[T],
	n uintptr, fn func(x, y T) T,
)

func Reduce1

func Reduce1[T any](
	xs Vector[T],
	n uintptr,
	zero T,
	fn func(r, x T) T,
) (result T)

func Reduce2

func Reduce2[T any](
	xs, ys Vector[T],
	n uintptr,
	zero T,
	fn func(r, x, y T) T,
) (result T)

Types

type Vector

type Vector[T any] struct {
	Values []T
	Offset uintptr
	Inc    uintptr
}

Jump to

Keyboard shortcuts

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