module

package
v0.0.2-0...-db6250e Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2020 License: CC0-1.0, CC0-1.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Sum

func Sum(M Interface, xs ...object.Element) (object.Element, error)

Sum return the sum x1 + ... + xn. The sum of the empty sequence is zero. If M satisfies the interface:

type Sumer interface {
	Sum(S ...object.Element) (object.Element, error) // Sum returns
	   the sum of the elements in the slice S. The sum of the empty
	   slice is the zero element.
}

then M's Sum method will be called.

Types

type Interface

type Interface interface {
	abeliangroup.Interface
	Scalable
}

Interface defines the module interface that all modules must satisfy.

type Scalable

type Scalable interface {
	ScalarMultiply(a object.Element, x object.Element) (object.Element, error) // ScalarMultiply returns the scalar product a * x, where a is an element of the ring, and x is an element of the module.
	ScalarRing() ring.Interface                                                // ScalarRing returns the scalar ring.
}

Scalable defines the ScalarMultiply and ScalarRing methods.

Jump to

Keyboard shortcuts

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