My Project
Toggle main menu visibility
Loading...
Searching...
No Matches
factory
cf_iter.cc
Go to the documentation of this file.
1
/* emacs edit mode for this file is -*- C++ -*- */
2
3
4
#include "config.h"
5
6
7
#include "
cf_assert.h
"
8
9
#include "
cf_defs.h
"
10
#include "
cf_iter.h
"
11
#include "
int_cf.h
"
12
#include "
int_poly.h
"
13
14
15
CFIterator::CFIterator
()
16
{
17
data
= 0;
cursor
= 0;
18
ispoly
=
false
;
hasterms
=
false
;
19
}
20
21
CFIterator::CFIterator
(
const
CFIterator
&
i
)
22
{
23
data
=
i
.data;
24
cursor
=
i
.cursor;
25
ispoly
=
i
.ispoly;
26
hasterms
=
i
.hasterms;
27
}
28
29
CFIterator::CFIterator
(
const
CanonicalForm
&
f
)
30
{
31
if
(
f
.inBaseDomain() ||
f
.inQuotDomain() )
32
{
33
data
=
f
;
cursor
= 0;
34
ispoly
=
false
;
hasterms
=
true
;
35
}
36
else
37
{
38
data
=
f
;
39
cursor
= ((
InternalPoly
*)(
f
.value))->firstTerm;
40
ispoly
=
true
;
hasterms
=
true
;
41
}
42
}
43
44
CFIterator::CFIterator
(
const
CanonicalForm
&
f
,
const
Variable
&
v
)
45
{
46
ASSERT
( !
f
.inQuotDomain(),
"illegal iterator"
);
47
ASSERT
(
v
.level() > 0,
"illegal iterator"
);
48
if
(
f
.inBaseDomain() )
49
{
50
data
=
f
;
cursor
= 0;
51
ispoly
=
false
;
hasterms
=
true
;
52
}
53
else
54
{
55
if
(
f
.mvar() ==
v
)
56
{
57
data
=
f
;
58
cursor
= ((
InternalPoly
*)(
f
.value))->firstTerm;
59
ispoly
=
true
;
hasterms
=
true
;
60
}
61
else
if
(
v
>
f
.mvar() )
62
{
63
data
=
f
;
cursor
= 0;
64
ispoly
=
false
;
hasterms
=
true
;
65
}
66
else
67
{
68
data
=
swapvar
(
f
,
v
,
f
.mvar().next() );
69
if
(
data
.mvar() ==
f
.mvar().next() )
70
{
71
cursor
= ((
InternalPoly
*)(
data
.value))->firstTerm;
72
ispoly
=
true
;
hasterms
=
true
;
73
}
74
else
75
{
76
cursor
= 0;
77
ispoly
=
false
;
hasterms
=
true
;
78
}
79
}
80
}
81
}
82
83
CFIterator::~CFIterator
()
84
{
85
data
= 0;
cursor
= 0;
86
}
87
88
CFIterator
&
89
CFIterator::operator=
(
const
CFIterator
&
i
)
90
{
91
if
(
this
!= &
i
)
92
{
93
data
=
i
.data;
94
cursor
=
i
.cursor;
95
ispoly
=
i
.ispoly;
96
hasterms
=
i
.hasterms;
97
}
98
return
*
this
;
99
}
100
101
CFIterator
&
102
CFIterator::operator=
(
const
CanonicalForm
&
f
)
103
{
104
if
(
f
.inBaseDomain() ||
f
.inQuotDomain() )
105
{
106
data
=
f
;
cursor
= 0;
107
ispoly
=
false
;
hasterms
=
true
;
108
}
109
else
110
{
111
data
=
f
;
112
cursor
= ((
InternalPoly
*)(
f
.value))->firstTerm;
113
ispoly
=
true
;
hasterms
=
true
;
114
}
115
return
*
this
;
116
}
i
int i
Definition
cfEzgcd.cc:132
cf_assert.h
assertions for Factory
ASSERT
#define ASSERT(expression, message)
Definition
cf_assert.h:99
cf_defs.h
factory switches.
cf_iter.h
Iterators for CanonicalForm's.
f
FILE * f
Definition
checklibs.c:9
CFIterator
class to iterate through CanonicalForm's
Definition
cf_iter.h:44
CFIterator::ispoly
bool ispoly
Definition
cf_iter.h:48
CFIterator::CFIterator
CFIterator()
Definition
cf_iter.cc:15
CFIterator::~CFIterator
~CFIterator()
Definition
cf_iter.cc:83
CFIterator::data
CanonicalForm data
Definition
cf_iter.h:46
CFIterator::cursor
termList cursor
Definition
cf_iter.h:47
CFIterator::hasterms
bool hasterms
Definition
cf_iter.h:48
CFIterator::operator=
CFIterator & operator=(const CFIterator &)
Definition
cf_iter.cc:89
CanonicalForm
factory's main class
Definition
canonicalform.h:86
InternalPoly
factory's class for polynomials
Definition
int_poly.h:71
Variable
factory's class for variables
Definition
factory.h:127
v
const Variable & v
< [in] a sqrfree bivariate poly
Definition
facBivar.h:39
swapvar
CanonicalForm FACTORY_PUBLIC swapvar(const CanonicalForm &, const Variable &, const Variable &)
swapvar() - swap variables x1 and x2 in f.
Definition
cf_ops.cc:168
int_cf.h
Factory's internal CanonicalForm's.
int_poly.h
Factory's internal polynomials.
Generated on
for My Project by
doxygen 1.17.0
for
Singular