generic

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package generic contains an interface T that that all float64 vector and matrix types implement.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type T

type T interface {

	// Cols returns the number of columns of the vector or matrix.
	Cols() int

	// Rows returns the number of rows of the vector or matrix.
	Rows() int

	// Size returns the number elements of the vector or matrix.
	Size() int

	// Slice returns the elements of the vector or matrix as slice.
	Slice() []float64

	// Get returns one element of the vector or matrix.
	Get(row, col int) float64

	// IsZero checks if all elements of the vector or matrix are zero.
	IsZero() bool
}

T is an interface that all float64 vector and matrix types implement.

Jump to

Keyboard shortcuts

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