Gröbner basis project
Codebase for research into Gröbner basis computation
betti.hpp
1 #ifndef __BETTI_HPP_
2 #define __BETTI_HPP_
3 
4 /*****************************************************************************\
5 * This file is part of DynGB. *
6 * *
7 * DynGB is free software: you can redistribute it and/or modify *
8 * it under the terms of the GNU General Public License as published by *
9 * the Free Software Foundation, either version 2 of the License, or *
10 * (at your option) any later version. *
11 * *
12 * Foobar is distributed in the hope that it will be useful, *
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15 * GNU General Public License for more details. *
16 * *
17 * You should have received a copy of the GNU General Public License *
18 * along with DynGB. If not, see <http://www.gnu.org/licenses/>. *
19 \*****************************************************************************/
20 
21 #include <list>
22 using std::list;
23 #include <map>
24 using std::map;
25 
26 #include "system_constants.hpp"
27 
28 #include "monomial.hpp"
29 
30 
51 map<DEG_TYPE, unsigned long> incremental_betti(
52  const list<Monomial>& T,
53  const WT_TYPE * grading = nullptr
54 );
55 
78 inline map<DEG_TYPE, unsigned long> incremental_betti(
79  const list<Monomial> & T, const Monomial & u,
80  const WT_TYPE * grading = nullptr
81 ) {
82  list<Monomial> U(T);
83  U.push_back(u);
84  return incremental_betti(U, grading);
85 }
86 
87 #endif
map< DEG_TYPE, unsigned long > incremental_betti(const list< Monomial > &T, const WT_TYPE *grading=nullptr)
Incremental Betti numbers for monomial ideals.
Definition: betti.cpp:30
Implementation of monomials.
Definition: monomial.hpp:69