utils

package
v0.0.0-...-fbe61e3 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2020 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DimsToVector

func DimsToVector(dims []domain.Tuple) []int

Converts dimension tuples to single vector

func GetAxis

func GetAxis(axis []int) int

func GetIVector

func GetIVector(newIndex int, newStrides, newShape []int) (*domain.IVector, error)

func GetIndex

func GetIndex(vector, newStrides, size []int) (int, error)

func GetIndexFromVector

func GetIndexFromVector(vector *domain.IVector, newStrides, shape *domain.IVector, broadcasting ...bool) (int, error)

func GetIndexes

func GetIndexes(vectors [][]int, newStrides, newShape []int) ([]int, error)

func GetShapeFromDims

func GetShapeFromDims(dims []domain.Tuple) []int

func GetStrides

func GetStrides(totalSize, totalDimensions int, shape *domain.IVector) domain.IVector

func GetVector

func GetVector(newIndex int, newStrides, newShape []int) ([]int, error)

func GetVectors

func GetVectors(indexes []int, newStrides, newShape []int) ([][]int, error)

func RemoveItemInSlice

func RemoveItemInSlice(a []int, index int) []int

Types

This section is empty.

Jump to

Keyboard shortcuts

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