vec

package
v0.0.0-...-ca9dcc0 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2018 License: BSD-3-Clause, BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Overview

Package vec provides functions for float64 vectors.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Concat

func Concat(xss ...[]float64) []float64

Concat returns the concatenation of its arguments. It does not modify its inputs.

func Linspace

func Linspace(lo, hi float64, num int) []float64

Linspace returns num values spaced evenly between lo and hi, inclusive. If num is 1, this returns an array consisting of lo.

func Logspace

func Logspace(lo, hi float64, num int, base float64) []float64

Logspace returns num values spaced evenly on a logarithmic scale between base**lo and base**hi, inclusive.

func Map

func Map(f func(float64) float64, xs []float64) []float64

Map returns f(x) for each x in xs.

f may be evaluated in parallel and in any order.

func Sum

func Sum(xs []float64) float64

Sum returns the sum of xs.

func Vectorize

func Vectorize(f func(float64) float64) func(xs []float64) []float64

Vectorize returns a function g(xs) that applies f to each x in xs.

f may be evaluated in parallel and in any order.

Types

This section is empty.

Jump to

Keyboard shortcuts

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