abelianmonoid

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(G Interface, 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. If G 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 G's Sum method will be called.

Types

type Interface

type Interface interface {
	object.Parent
	Zero() object.Element                                                                 // Zero returns the additive identity of the ring.
	IsZero(x object.Element) (bool, error)                                                // IsZero returns true iff x is the additive identity element of the ring.
	Add(x object.Element, y object.Element) (object.Element, error)                       // Add returns x + y.]
	ScalarMultiplyByInteger(n *integer.Element, x object.Element) (object.Element, error) // ScalarMultiplyByInteger returns nx, where this is defined to be:

}

Interface defines the interface that all abelian monoids must satisfy.

Jump to

Keyboard shortcuts

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