Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Sum ¶
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 {
abelianmonoid.Interface
Subtract(x object.Element, y object.Element) (object.Element, error) // Subtract returns x - y.
Negate(x object.Element) (object.Element, error) // Negate returns -x.
}
Interface defines the interface that all abelian groups must satisfy.
Click to show internal directories.
Click to hide internal directories.