Frobby  0.9.5
LibDimensionTest.cpp
Go to the documentation of this file.
1 /* Frobby: Software for monomial ideal computations.
2  Copyright (C) 2009 Bjarke Hammersholt Roune (www.broune.com)
3 
4  This program is free software; you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation; either version 2 of the License, or
7  (at your option) any later version.
8 
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with this program. If not, see http://www.gnu.org/licenses/.
16 */
17 #include "stdinc.h"
18 #include "frobby.h"
19 
20 #include "tests.h"
21 #include "BigIdeal.h"
22 #include "IdealFactory.h"
23 #include "LibTest.h"
24 
25 TEST_SUITE2(LibraryInterface, DimensionAndCodimension)
26 
27 namespace {
29  mpz_class dimension(const BigIdeal& ideal) {
30  mpz_class dim;
31  Frobby::dimension(toLibIdeal(ideal), dim.get_mpz_t());
32  return dim;
33  }
34 
36  mpz_class codimension(const BigIdeal& ideal) {
37  mpz_class codim;
38  Frobby::codimension(toLibIdeal(ideal), codim.get_mpz_t());
39  return codim;
40  }
41 }
42 
43 TEST(DimensionAndCodimension, WholeRing) {
46 
49 }
50 
51 TEST(DimensionAndCodimension, ZeroIdeal) {
54 
57 }
58 
59 TEST(DimensionAndCodimension, Typical) {
62 
65 }
TEST(DimensionAndCodimension, WholeRing)
Frobby::Ideal toLibIdeal(const BigIdeal &ideal)
Returns a library interface ideal that corresponds to the parameter ideal.
Definition: LibTest.cpp:26
#define ASSERT_EQ(A, B)
Definition: asserts.h:147
static BigIdeal xy_xz()
Returns .
static BigIdeal xx_yy_xz_yz()
Returns .
static BigIdeal zeroIdeal(size_t varCount)
Returns the ideal in the ring VarNames(varCount).
static BigIdeal wholeRing(size_t varCount)
Returns in the ring VarNames(varCount).
#define TEST_SUITE2(PARENT, SUITE)
Definition: macroes.h:28
void dimension(const Ideal &ideal, mpz_t dim)
Compute the Krull dimension of a monomial ideal.
Definition: frobby.cpp:447
void codimension(const Ideal &ideal, mpz_t codim)
Compute the codimension of a monomial ideal.
Definition: frobby.cpp:441