My Project
Toggle main menu visibility
Loading...
Searching...
No Matches
kernel
spectrum
npolygon.h
Go to the documentation of this file.
1
// ----------------------------------------------------------------------------
2
// npolygon.h
3
// begin of file
4
// Stephan Endrass, endrass@mathematik.uni-mainz.de
5
// 23.7.99
6
// ----------------------------------------------------------------------------
7
8
#ifndef NPOLYGON_H
9
#define NPOLYGON_H
10
11
#include "
kernel/spectrum/GMPrat.h
"
12
13
// ----------------------------------------------------------------------------
14
// Class representing a linear form QQ^N-->QQ
15
// ----------------------------------------------------------------------------
16
17
class
linearForm
18
{
19
20
private
:
21
22
Rational
*
c
;
// the coefficients
23
int
N
;
// number of coefficients
24
25
public
:
26
27
linearForm
( );
28
linearForm
(
const
linearForm
& );
29
~linearForm
( );
30
31
linearForm
&
operator =
(
const
linearForm
& );
32
33
friend
int
operator ==
(
const
linearForm
&,
const
linearForm
& );
34
35
void
copy_new
(
int
);
36
void
copy_delete
(
void
);
37
void
copy_zero
(
void
);
38
void
copy_shallow
(
linearForm
& );
39
void
copy_deep
(
const
linearForm
& );
40
41
Rational
weight
( poly,
const
ring r )
const
;
42
Rational
weight_shift
( poly,
const
ring r )
const
;
43
Rational
weight1
( poly,
const
ring r )
const
;
44
Rational
weight_shift1
( poly,
const
ring r )
const
;
45
46
Rational
pweight
( poly,
const
ring r )
const
;
47
48
int
positive
(
void
);
49
50
#ifdef NPOLYGON_PRINT
51
friend
ostream &
operator <<
( ostream&,
const
linearForm
& );
52
#endif
53
54
friend
class
newtonPolygon
;
55
};
56
57
// ----------------------------------------------------------------------------
58
// Class representing a Newton polygon
59
// ----------------------------------------------------------------------------
60
61
class
newtonPolygon
62
{
63
64
private
:
65
66
linearForm
*
l
;
// the linear forms
67
int
N
;
// number of linear forms
68
69
public
:
70
71
newtonPolygon
( );
72
newtonPolygon
(
const
newtonPolygon
& );
73
newtonPolygon
( poly,
const
ring r );
74
~newtonPolygon
( );
75
76
newtonPolygon
&
operator =
(
const
newtonPolygon
& );
77
78
79
void
copy_new
(
int
);
80
void
copy_delete
(
void
);
81
void
copy_zero
(
void
);
82
void
copy_shallow
(
newtonPolygon
& );
83
void
copy_deep
(
const
newtonPolygon
& );
84
85
void
add_linearForm
(
const
linearForm
& );
86
87
Rational
weight
( poly,
const
ring r )
const
;
88
Rational
weight_shift
( poly,
const
ring r )
const
;
89
Rational
weight1
( poly,
const
ring r )
const
;
90
Rational
weight_shift1
( poly,
const
ring r )
const
;
91
92
//int is_sqh ( void ) const;
93
//Rational* sqh_weights( void ) const;
94
//int sqh_N ( void ) const;
95
96
#ifdef NPOLYGON_PRINT
97
friend
ostream &
operator <<
( ostream&,
const
newtonPolygon
& );
98
#endif
99
};
100
101
// ---------------------------------------
102
// inline functions for class linearForm
103
// ---------------------------------------
104
105
// ----------------------------------------------------------------------------
106
// Initialize with zero
107
// ----------------------------------------------------------------------------
108
109
inline
void
linearForm::copy_zero
(
void
)
110
{
111
c
= (
Rational
*)
NULL
;
112
N
= 0;
113
}
114
115
// ----------------------------------------------------------------------------
116
// Initialize shallow from another linear form
117
// ----------------------------------------------------------------------------
118
119
inline
void
linearForm::copy_shallow
(
linearForm
&
l
)
120
{
121
c
=
l
.c;
122
N
=
l
.N;
123
}
124
125
126
// ----------------------------------------------------------------------------
127
// Zero constructor
128
// ----------------------------------------------------------------------------
129
130
inline
linearForm::linearForm
( )
131
{
132
copy_zero
( );
133
}
134
135
136
// ------------------------------------------
137
// inline functions for class newtonPolygon
138
// ------------------------------------------
139
140
// ----------------------------------------------------------------------------
141
// Initialize with zero
142
// ----------------------------------------------------------------------------
143
144
inline
void
newtonPolygon::copy_zero
(
void
)
145
{
146
l
= (
linearForm
*)
NULL
;
147
N
= 0;
148
}
149
150
// ----------------------------------------------------------------------------
151
// Initialize shallow from another Newton polygon
152
// ----------------------------------------------------------------------------
153
154
inline
void
newtonPolygon::copy_shallow
(
newtonPolygon
&np )
155
{
156
l
= np.
l
;
157
N
= np.
N
;
158
}
159
160
161
// ----------------------------------------------------------------------------
162
// Zero constructor
163
// ----------------------------------------------------------------------------
164
165
inline
newtonPolygon::newtonPolygon
( )
166
{
167
copy_zero
( );
168
}
169
170
#endif
/* NPOLYGON_H */
171
172
// ----------------------------------------------------------------------------
173
// npolygon.h
174
// end of file
175
// ----------------------------------------------------------------------------
GMPrat.h
l
int l
Definition
cfEzgcd.cc:100
Rational
Definition
GMPrat.h:15
linearForm
Definition
npolygon.h:18
linearForm::weight_shift
Rational weight_shift(poly, const ring r) const
Definition
npolygon.cc:229
linearForm::weight
Rational weight(poly, const ring r) const
Definition
npolygon.cc:189
linearForm::copy_zero
void copy_zero(void)
Definition
npolygon.h:109
linearForm::linearForm
linearForm()
Definition
npolygon.h:130
linearForm::operator==
friend int operator==(const linearForm &, const linearForm &)
Definition
npolygon.cc:172
linearForm::weight1
Rational weight1(poly, const ring r) const
Definition
npolygon.cc:245
linearForm::copy_new
void copy_new(int)
Definition
npolygon.cc:36
linearForm::c
Rational * c
Definition
npolygon.h:22
linearForm::weight_shift1
Rational weight_shift1(poly, const ring r) const
Definition
npolygon.cc:262
linearForm::N
int N
Definition
npolygon.h:23
linearForm::copy_delete
void copy_delete(void)
Definition
npolygon.cc:82
linearForm::newtonPolygon
friend class newtonPolygon
Definition
npolygon.h:54
linearForm::operator=
linearForm & operator=(const linearForm &)
Definition
npolygon.cc:125
linearForm::pweight
Rational pweight(poly, const ring r) const
Definition
npolygon.cc:205
linearForm::~linearForm
~linearForm()
Definition
npolygon.cc:116
linearForm::positive
int positive(void)
Definition
npolygon.cc:279
linearForm::copy_shallow
void copy_shallow(linearForm &)
Definition
npolygon.h:119
linearForm::copy_deep
void copy_deep(const linearForm &)
Definition
npolygon.cc:93
newtonPolygon::add_linearForm
void add_linearForm(const linearForm &)
Definition
npolygon.cc:525
newtonPolygon::copy_new
void copy_new(int)
Definition
npolygon.cc:296
newtonPolygon::copy_shallow
void copy_shallow(newtonPolygon &)
Definition
npolygon.h:154
newtonPolygon::newtonPolygon
newtonPolygon()
Definition
npolygon.h:165
newtonPolygon::weight
Rational weight(poly, const ring r) const
Definition
npolygon.cc:564
newtonPolygon::N
int N
Definition
npolygon.h:67
newtonPolygon::weight_shift1
Rational weight_shift1(poly, const ring r) const
Definition
npolygon.cc:628
newtonPolygon::copy_delete
void copy_delete(void)
Definition
npolygon.cc:342
newtonPolygon::operator=
newtonPolygon & operator=(const newtonPolygon &)
Definition
npolygon.cc:385
newtonPolygon::l
linearForm * l
Definition
npolygon.h:66
newtonPolygon::weight_shift
Rational weight_shift(poly, const ring r) const
Definition
npolygon.cc:585
newtonPolygon::copy_zero
void copy_zero(void)
Definition
npolygon.h:144
newtonPolygon::~newtonPolygon
~newtonPolygon()
Definition
npolygon.cc:376
newtonPolygon::weight1
Rational weight1(poly, const ring r) const
Definition
npolygon.cc:606
newtonPolygon::copy_deep
void copy_deep(const newtonPolygon &)
Definition
npolygon.cc:353
NULL
#define NULL
Definition
omList.c:12
operator<<
ostream & operator<<(ostream &s, const spectrum &spec)
Definition
semic.cc:249
Generated on
for My Project by
doxygen 1.17.0
for
Singular