spielwiese
Last change
on this file since cd7c3e1 was
cd7c3e1,
checked in by Christian Eder, 15 years ago
|
fitting to lists.h
git-svn-id: file:///usr/local/Singular/svn/trunk@11271 2c84dea3-7e68-4137-9b89-c4e89433aadc
|
-
Property mode set to
100644
|
File size:
1.7 KB
|
Line | |
---|
1 | /**************************************** |
---|
2 | * Computer Algebra System SINGULAR * |
---|
3 | ****************************************/ |
---|
4 | /* $Id: lpolynomial.cc,v 1.3 2008-12-26 13:51:50 ederc Exp $ */ |
---|
5 | /* |
---|
6 | * ABSTRACT: lpolynomial definition |
---|
7 | */ |
---|
8 | #include "mod2.h" |
---|
9 | |
---|
10 | #ifdef HAVE_F5 |
---|
11 | #include "kutil.h" |
---|
12 | #include "structs.h" |
---|
13 | #include "omalloc.h" |
---|
14 | #include "polys.h" |
---|
15 | #include "p_polys.h" |
---|
16 | #include "ideals.h" |
---|
17 | #include "febase.h" |
---|
18 | #include "kstd1.h" |
---|
19 | #include "khstd.h" |
---|
20 | #include "kbuckets.h" |
---|
21 | #include "weight.h" |
---|
22 | #include "intvec.h" |
---|
23 | #include "pInline1.h" |
---|
24 | #include "f5gb.h" |
---|
25 | #include "lpolynomial.h" |
---|
26 | #include "lists.h" |
---|
27 | /* |
---|
28 | ================================================================ |
---|
29 | all functions working on the class LPoly for labeled polynomials |
---|
30 | ================================================================ |
---|
31 | */ |
---|
32 | void LPoly::setPoly(poly* p) |
---|
33 | { |
---|
34 | polynomial = *p; |
---|
35 | } |
---|
36 | |
---|
37 | void LPoly::setTerm(poly* t) { |
---|
38 | term = *t; |
---|
39 | } |
---|
40 | |
---|
41 | void LPoly::setIndex(long* i) { |
---|
42 | index = *i; |
---|
43 | } |
---|
44 | |
---|
45 | |
---|
46 | void LPoly::setDel(bool b) { |
---|
47 | del = b; |
---|
48 | } |
---|
49 | |
---|
50 | poly LPoly::getPoly() const { |
---|
51 | return polynomial; |
---|
52 | } |
---|
53 | |
---|
54 | poly LPoly::getTerm() const { |
---|
55 | return term; |
---|
56 | } |
---|
57 | |
---|
58 | long LPoly::getIndex() const { |
---|
59 | return index; |
---|
60 | } |
---|
61 | |
---|
62 | bool LPoly::getDel() const { |
---|
63 | return del; |
---|
64 | } |
---|
65 | |
---|
66 | void LPoly::set(poly* t, long* i, poly* p) { |
---|
67 | this->setTerm(t); |
---|
68 | this->setIndex(i); |
---|
69 | this->setPoly(p); |
---|
70 | } |
---|
71 | |
---|
72 | /* |
---|
73 | ===================================================== |
---|
74 | comparing two labeled polynomials by their signatures |
---|
75 | ===================================================== |
---|
76 | */ |
---|
77 | int LPoly::compare(const LPoly& lp) const { |
---|
78 | if(index > lp.index) { |
---|
79 | return 1; |
---|
80 | } |
---|
81 | if(index < lp.index) { |
---|
82 | return -1; |
---|
83 | } |
---|
84 | return 0; |
---|
85 | } |
---|
86 | |
---|
87 | LPoly* LPoly::get() { |
---|
88 | return this; |
---|
89 | } |
---|
90 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.