Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- class SelectionStrategy n s where
- type Weight n s ord :: Type
- calcWeight :: (IsOrderedPolynomial poly, n ~ Arity poly) => Proxy s -> poly -> poly -> Weight n s (MOrder poly)
- calcWeight' :: (SelectionStrategy (Arity poly) s, IsOrderedPolynomial poly) => s -> poly -> poly -> Weight (Arity poly) s (MOrder poly)
- data GrevlexStrategy = GrevlexStrategy
- data NormalStrategy = NormalStrategy
- newtype SugarStrategy s = SugarStrategy s
- data GradedStrategy = GradedStrategy
Documentation
class SelectionStrategy n s where Source #
Type-class for selection strategies in Buchberger's algorithm.
calcWeight :: (IsOrderedPolynomial poly, n ~ Arity poly) => Proxy s -> poly -> poly -> Weight n s (MOrder poly) Source #
Calculates the weight for the given pair of polynomial used for selection strategy.
Instances
calcWeight' :: (SelectionStrategy (Arity poly) s, IsOrderedPolynomial poly) => s -> poly -> poly -> Weight (Arity poly) s (MOrder poly) Source #
Calculate the weight of given polynomials w.r.t. the given strategy.
Buchberger's algorithm proccesses the pair with the most least weight first.
This function requires the Ord
instance for the weight; this constraint is not required
in the calcWeight
because of the ease of implementation. So use this function.
data GrevlexStrategy Source #
Choose the pair with the least LCM(LT(f), LT(g)) w.r.t. Grevlex
order.
Instances
data NormalStrategy Source #
Buchberger's normal selection strategy. This selects the pair with the least LCM(LT(f), LT(g)) w.r.t. current monomial ordering.
Instances
newtype SugarStrategy s Source #
Sugar strategy. This chooses the pair with the least phantom homogenized degree and then break the tie with the given strategy (say s
).
Instances
data GradedStrategy Source #