monomialorder

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, CC0-1.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CmpGrevlex

func CmpGrevlex(R Interface, S1 []object.Element, S2 []object.Element) (int, error)

CmpGrevlex compares the slices S1 and S2 using graded reverse lexicographic (grevlex) order, where the elements are compared using R.. Returns -1 if S1 < S2, 0 if S1 = S2, and +1 if S1 > S2. This will return an error if len(S1) does not equal len(S2).

func CmpGrevlexInt64

func CmpGrevlexInt64(S1 []int64, S2 []int64) (int, error)

CmpGrevlexInt64 compares the slices S1 and S2 using graded reverse lexicographic (grevlex) order. Returns -1 if S1 < S2, 0 if S1 = S2, and +1 if S1 > S2. This will return an error if len(S1) does not equal len(S2).

func CmpGrevlexInteger

func CmpGrevlexInteger(S1 []*integer.Element, S2 []*integer.Element) (int, error)

CmpGrevlexInteger compares the slices S1 and S2 using graded reverse lexicographic (grevlex) order. Returns -1 if S1 < S2, 0 if S1 = S2, and +1 if S1 > S2. This will return an error if len(S1) does not equal len(S2).

func CmpGrevlexRational

func CmpGrevlexRational(S1 []*rational.Element, S2 []*rational.Element) (int, error)

CmpGrevlexRational compares the slices S1 and S2 using graded reverse lexicographic (grevlex) order. Returns -1 if S1 < S2, 0 if S1 = S2, and +1 if S1 > S2. This will return an error if len(S1) does not equal len(S2).

func CmpGrevlexUint64

func CmpGrevlexUint64(S1 []uint64, S2 []uint64) (int, error)

CmpGrevlexUint64 compares the slices S1 and S2 using graded reverse lexicographic (grevlex) order. Returns -1 if S1 < S2, 0 if S1 = S2, and +1 if S1 > S2. This will return an error if len(S1) does not equal len(S2).

func CmpGrlex

func CmpGrlex(R Interface, S1 []object.Element, S2 []object.Element) (int, error)

CmpGrlex compares the slices S1 and S2 using graded lexicographic (grlex) order, where the elements are compared using R. Returns -1 if S1 < S2, 0 if S1 = S2, and +1 if S1 > S2. This will return an error if len(S1) does not equal len(S2).

func CmpGrlexInt64

func CmpGrlexInt64(S1 []int64, S2 []int64) (int, error)

CmpGrlexInt64 compares the slices S1 and S2 using graded lexicographic (grlex) order. Returns -1 if S1 < S2, 0 if S1 = S2, and +1 if S1 > S2. This will return an error if len(S1) does not equal len(S2).

func CmpGrlexInteger

func CmpGrlexInteger(S1 []*integer.Element, S2 []*integer.Element) (int, error)

CmpGrlexInteger compares the slices S1 and S2 using graded lexicographic (grlex) order. Returns -1 if S1 < S2, 0 if S1 = S2, and +1 if S1 > S2. This will return an error if len(S1) does not equal len(S2).

func CmpGrlexRational

func CmpGrlexRational(S1 []*rational.Element, S2 []*rational.Element) (int, error)

CmpGrlexRational compares the slices S1 and S2 using graded lexicographic (grlex) order. Returns -1 if S1 < S2, 0 if S1 = S2, and +1 if S1 > S2. This will return an error if len(S1) does not equal len(S2).

func CmpGrlexUint64

func CmpGrlexUint64(S1 []uint64, S2 []uint64) (int, error)

CmpGrlexUint64 compares the slices S1 and S2 using graded lexicographic (grlex) order. Returns -1 if S1 < S2, 0 if S1 = S2, and +1 if S1 > S2. This will return an error if len(S1) does not equal len(S2).

func CmpLex

func CmpLex(R compare.TotalOrder, S1 []object.Element, S2 []object.Element) (int, error)

CmpLex compares the slices S1 and S2 using lexicographic (lex) order, where the elements are compared using R. Returns -1 if S1 < S2, 0 if S1 = S2, and +1 if S1 > S2. This will return an error if len(S1) does not equal len(S2).

func CmpLexInt64

func CmpLexInt64(S1 []int64, S2 []int64) (int, error)

CmpLexInt64 compares the slices S1 and S2 using lexicographic (lex) order. Returns -1 if S1 < S2, 0 if S1 = S2, and +1 if S1 > S2. This will return an error if len(S1) does not equal len(S2).

func CmpLexInteger

func CmpLexInteger(S1 []*integer.Element, S2 []*integer.Element) (int, error)

CmpLexInteger compares the slices S1 and S2 using lexicographic (lex) order. Returns -1 if S1 < S2, 0 if S1 = S2, and +1 if S1 > S2. This will return an error if len(S1) does not equal len(S2).

func CmpLexRational

func CmpLexRational(S1 []*rational.Element, S2 []*rational.Element) (int, error)

CmpLexRational compares the slices S1 and S2 using lexicographic (lex) order. Returns -1 if S1 < S2, 0 if S1 = S2, and +1 if S1 > S2. This will return an error if len(S1) does not equal len(S2).

func CmpLexUint64

func CmpLexUint64(S1 []uint64, S2 []uint64) (int, error)

CmpLexUint64 compares the slices S1 and S2 using lexicographic (lex) order. Returns -1 if S1 < S2, 0 if S1 = S2, and +1 if S1 > S2. This will return an error if len(S1) does not equal len(S2).

Types

type Interface

type Interface interface {
	abelianmonoid.Interface
	compare.Cmper
}

Interface defines the interface that must be satisfied in order to use one of the standard monomial orders.

type MonomialOrderer

type MonomialOrderer interface {
	MonomialOrder() Type // MonomialOrder returns the monomial order.
}

MonomialOrderer defines the interface satisfied by an object with a MonomialOrder method.

type Type

type Type uint8

Type represents one of the standard monomial orders as defined by the constants "Lex", "Grlex", and "Grevlex".

const (
	Lex     Type = iota // Lexicographic order. We say that x > y if the left-most non-zero entry of x - y is positive.
	Grlex               // Graded lexicographic order. We say that x > y if either the total order |x| > |y|, or if |x| = |y| and the left-most non-zero entry of x - y is positive.
	Grevlex             // Graded reverse lexicographic order. We say that x > y if either the total order |x| > |y|, or if |x| = |y| and the right-most non-zero entry of x - y is negative.
)

The three standard monomial orders.

func (Type) Cmp

func (c Type) Cmp(R Interface, S1 []object.Element, S2 []object.Element) (int, error)

Cmp compares the slices S1 and S2 using the monomial order, where the elements are compared using R. This will return an error if len(S1) does not equal len(S2).

func (Type) CmpInt64

func (c Type) CmpInt64(S1 []int64, S2 []int64) (int, error)

CmpInt64 compares the slices S1 and S2 using the monomial order. This will return an error if len(S1) does not equal len(S2).

func (Type) CmpInteger

func (c Type) CmpInteger(S1 []*integer.Element, S2 []*integer.Element) (int, error)

CmpInteger compares the slices S1 and S2 using the monomial order. This will return an error if len(S1) does not equal len(S2).

func (Type) CmpRational

func (c Type) CmpRational(S1 []*rational.Element, S2 []*rational.Element) (int, error)

CmpRational compares the slices S1 and S2 using the monomial order. This will return an error if len(S1) does not equal len(S2).

func (Type) CmpUint64

func (c Type) CmpUint64(S1 []uint64, S2 []uint64) (int, error)

CmpUint64 compares the slices S1 and S2 using the monomial order. This will return an error if len(S1) does not equal len(S2).

func (Type) IsValid

func (c Type) IsValid() bool

IsValid returns true iff the monomial order is valid (that is, is one of the defined types).

func (Type) String

func (c Type) String() string

String returns a string description of the order.

Jump to

Keyboard shortcuts

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