Frobby 0.10.0
Loading...
Searching...
No Matches
TermExtra.h
1/* Frobby: Software for monomial ideal computations.
2 Copyright (C) 2007 Bjarke Hammersholt Roune (www.broune.com)
3 Copyright (C) 2010 University of Aarhus
4 Contact Bjarke Hammersholt Roune for license information (www.broune.com)
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see http://www.gnu.org/licenses/.
18*/
19#ifndef TERM_EXTRA_GUARD
20#define TERM_EXTRA_GUARD
21
22#include "Term.h"
23
28
31Exponent median(const Exponent* a, size_t varCount);
32inline Exponent median(const Term& a) {
33 return median(a.begin(), a.getVarCount());
34}
35
38Exponent medianPositive(const Exponent* a, size_t varCount);
39inline Exponent medianPositive(const Term& a) {
40 return medianPositive(a.begin(), a.getVarCount());
41}
42
46void totalDegree(mpz_class& res, const Exponent* a, size_t varCount);
47inline void totalDegree(mpz_class& res, const Term& a) {
48 totalDegree(res, a.begin(), a.getVarCount());
49}
50
53Exponent minimumPositive(const Exponent* a, size_t varCount);
54inline Exponent minimumPositive(const Term& a) {
55 return minimumPositive(a.begin(), a.getVarCount());
56}
57
60Exponent maximum(const Exponent* a, size_t varCount);
61inline Exponent maximum(const Term& a) {
62 return maximum(a.begin(), a.getVarCount());
63}
64
65#endif
Definition Term.h:49