bigvector

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2021 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Overview

Package bigvector implements operations on vectors of immutable multi-precision integers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Vector

type Vector interface {
	// Len returns vector length.
	Len() int

	// Idx returns integer at index i. Returned integer must not be written to.
	Idx(i int) *big.Int
}

Vector of immutable multi-precision integers.

func Add

func Add(u, v Vector) Vector

Add vectors.

func Lsh

func Lsh(v Vector, s uint) Vector

Lsh left shifts every element of the vector v.

func New

func New(n int) Vector

New constructs an n-dimensional zero vector.

func NewBasis

func NewBasis(n, i int) Vector

NewBasis constructs an n-dimensional basis vector with a 1 in position i.

Jump to

Keyboard shortcuts

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