My Project
Toggle main menu visibility
Loading...
Searching...
No Matches
factory
cf_map.h
Go to the documentation of this file.
1
/* emacs edit mode for this file is -*- C++ -*- */
2
3
#ifndef INCL_CF_MAP_H
4
#define INCL_CF_MAP_H
5
6
/**
7
* @file cf_map.h
8
*
9
* map polynomials
10
*
11
**/
12
13
// #include "config.h"
14
15
#ifndef NOSTREAMIO
16
#ifdef HAVE_IOSTREAM
17
#include <iostream>
18
#define OSTREAM std::ostream
19
#elif defined(HAVE_IOSTREAM_H)
20
#include <iostream.h>
21
#define OSTREAM ostream
22
#endif
23
#endif
/* NOSTREAMIO */
24
25
#include "
variable.h
"
26
#include "
canonicalform.h
"
27
#include "
factory/templates/ftmpl_list.h
"
28
29
/*BEGINPUBLIC*/
30
31
/** class MapPair
32
*
33
* class MapPair - stores one mapping pair (Variable -> CanonicalForm).
34
*
35
* This class is only used to store such pairs. It has no
36
* methods to transform a CanonicalForm as the class CFMap has.
37
*
38
* V, S: the pair (V -> S)
39
*
40
**/
41
/** inline method
42
*
43
* Variable var () const
44
* CanonicalForm subst () const
45
*
46
* var(), subst() - selectors, return V and P, resp.
47
*
48
**/
49
class
MapPair
50
{
51
private
:
52
Variable
V
;
53
CanonicalForm
S
;
54
public
:
55
MapPair
(
const
Variable
&
v
,
const
CanonicalForm
&
s
) :
V
(
v
),
S
(
s
) {}
56
MapPair
() :
V
(),
S
(1) {}
57
MapPair
(
const
MapPair
&
p
) :
V
(
p
.
V
),
S
(
p
.
S
) {}
58
~MapPair
() {}
59
MapPair
&
operator =
(
const
MapPair
&
p
);
60
Variable
var
()
const
{
return
V
; }
61
CanonicalForm
subst
()
const
{
return
S
; }
62
#ifndef NOSTREAMIO
63
void
print
(
OSTREAM
&)
const
;
64
friend
OSTREAM
&
operator <<
(
OSTREAM
&
s
,
const
MapPair
&
p
);
65
#endif
/* NOSTREAMIO */
66
};
67
68
typedef
List<MapPair>
MPList
;
69
typedef
ListIterator<MapPair>
MPListIterator
;
70
71
/** class CFMap
72
*
73
* class CFMap - class to map canonical forms.
74
*
75
* Use an object of class CFMap to insert 'values' into canonical
76
* form. Such a mapping is defined by a list of MapPairs (V -> S)
77
* describing which canonical form S to insert for variable V.
78
* Hereby, the substituted canonical forms are not subject to
79
* further substitutions.
80
*
81
* P: list of MapPairs, sorted by level in descending order
82
*
83
**/
84
class
CFMap
85
{
86
private
:
87
MPList
P
;
88
public
:
89
CFMap
() {}
90
CFMap
(
const
CanonicalForm
&
s
) :
P
(
MapPair
(
Variable
(),
s
) ) {}
91
CFMap
(
const
Variable
&
v
) :
P
(
MapPair
(
v
, 1 ) ) {}
92
CFMap
(
const
Variable
&
v
,
const
CanonicalForm
&
s
) :
P
(
MapPair
(
v
,
s
) ) {}
93
~CFMap
() {}
94
CFMap
(
const
CFList
& L );
95
CFMap
(
const
CFMap
&
m
) :
P
(
m
.
P
) {}
96
CFMap
&
operator =
(
const
CFMap
&
m
);
97
void
newpair
(
const
Variable
&
v
,
const
CanonicalForm
&
s
);
98
CanonicalForm
operator ()
(
const
CanonicalForm
&
f
)
const
;
99
#ifndef NOSTREAMIO
100
friend
OSTREAM
&
operator <<
(
OSTREAM
&
s
,
const
CFMap
&
m
);
101
#endif
/* NOSTREAMIO */
102
};
103
104
CanonicalForm
compress
(
const
CanonicalForm
&
f
,
CFMap
&
m
);
105
void
compress
(
const
CFArray
& a,
CFMap
&
M
,
CFMap
&
N
);
106
void
compress
(
const
CanonicalForm
&
f
,
const
CanonicalForm
&
g
,
CFMap
&
M
,
CFMap
&
N
);
107
108
/*ENDPUBLIC*/
109
110
#endif
/* ! INCL_CF_MAP_H */
canonicalform.h
Header for factory's main class CanonicalForm.
OSTREAM
#define OSTREAM
Definition
canonicalform.h:16
CFArray
Array< CanonicalForm > CFArray
Definition
canonicalform.h:397
CFList
List< CanonicalForm > CFList
Definition
canonicalform.h:395
N
const CanonicalForm CFMap CFMap & N
Definition
cfEzgcd.cc:56
m
int m
Definition
cfEzgcd.cc:128
p
int p
Definition
cfModGcd.cc:4086
g
g
Definition
cfModGcd.cc:4098
MPListIterator
ListIterator< MapPair > MPListIterator
Definition
cf_map.h:69
compress
CanonicalForm compress(const CanonicalForm &f, CFMap &m)
CanonicalForm compress ( const CanonicalForm & f, CFMap & m ).
Definition
cf_map.cc:210
MPList
List< MapPair > MPList
Definition
cf_map.h:68
f
FILE * f
Definition
checklibs.c:9
CFMap
class CFMap
Definition
cf_map.h:85
CFMap::CFMap
CFMap(const Variable &v)
Definition
cf_map.h:91
CFMap::operator()
CanonicalForm operator()(const CanonicalForm &f) const
CanonicalForm CFMap::operator () ( const CanonicalForm & f ) const.
Definition
cf_map.cc:178
CFMap::CFMap
CFMap(const CFMap &m)
Definition
cf_map.h:95
CFMap::newpair
void newpair(const Variable &v, const CanonicalForm &s)
void CFMap::newpair ( const Variable & v, const CanonicalForm & s )
Definition
cf_map.cc:120
CFMap::CFMap
CFMap(const Variable &v, const CanonicalForm &s)
Definition
cf_map.h:92
CFMap::operator<<
friend OSTREAM & operator<<(OSTREAM &s, const CFMap &m)
OSTREAM & operator << ( OSTREAM & s, const CFMap & m ).
Definition
cf_map.cc:191
CFMap::P
MPList P
Definition
cf_map.h:87
CFMap::~CFMap
~CFMap()
Definition
cf_map.h:93
CFMap::operator=
CFMap & operator=(const CFMap &m)
CFMap & CFMap::operator = ( const CFMap & m ).
Definition
cf_map.cc:77
CFMap::CFMap
CFMap()
Definition
cf_map.h:89
CFMap::CFMap
CFMap(const CanonicalForm &s)
Definition
cf_map.h:90
CanonicalForm
factory's main class
Definition
canonicalform.h:86
ListIterator
Definition
ftmpl_list.h:87
List
Definition
ftmpl_list.h:52
MapPair
class MapPair
Definition
cf_map.h:50
MapPair::var
Variable var() const
Definition
cf_map.h:60
MapPair::S
CanonicalForm S
Definition
cf_map.h:53
MapPair::print
void print(OSTREAM &) const
Definition
cf_map.cc:50
MapPair::MapPair
MapPair(const Variable &v, const CanonicalForm &s)
Definition
cf_map.h:55
MapPair::operator<<
friend OSTREAM & operator<<(OSTREAM &s, const MapPair &p)
OSTREAM & operator << ( OSTREAM & s, const MapPair & p ).
Definition
cf_map.cc:44
MapPair::MapPair
MapPair(const MapPair &p)
Definition
cf_map.h:57
MapPair::V
Variable V
Definition
cf_map.h:52
MapPair::operator=
MapPair & operator=(const MapPair &p)
MapPair & MapPair::operator = ( const MapPair & p ).
Definition
cf_map.cc:28
MapPair::~MapPair
~MapPair()
Definition
cf_map.h:58
MapPair::MapPair
MapPair()
Definition
cf_map.h:56
MapPair::subst
CanonicalForm subst() const
Definition
cf_map.h:61
Variable
factory's class for variables
Definition
factory.h:127
s
const CanonicalForm int s
Definition
facAbsFact.cc:51
v
const Variable & v
< [in] a sqrfree bivariate poly
Definition
facBivar.h:39
ftmpl_list.h
MPList
List< MapPair > MPList
Definition
factory.h:986
M
#define M
Definition
sirandom.c:25
variable.h
operations on variables
Generated on
for My Project by
doxygen 1.17.0
for
Singular