My Project
debian-1:4.1.1-p2+ds-4build1
factory
templates
ftmpl_afactor.cc
Go to the documentation of this file.
1
/* emacs edit mode for this file is -*- C++ -*- */
2
3
#include "
factory/templates/ftmpl_afactor.h
"
4
5
template
<
class
T>
6
AFactor<T>
&
AFactor<T>::operator=
(
const
AFactor<T>
&
f
)
7
{
8
if
(
this
!= &
f
)
9
{
10
_minpoly =
f
._minpoly;
11
_factor =
f
._factor;
12
_exp =
f
._exp;
13
}
14
return
*
this
;
15
}
16
17
template
<
class
T>
18
int
operator==
(
const
AFactor<T>
&f1,
const
AFactor<T>
&f2 )
19
{
20
return
(f1.
exp
() == f2.
exp
()) && (f1.
factor
() == f2.
factor
()) && (f1.
minpoly
() == f2.
minpoly
());
//minpoly comparision may not be enough but checking the fields they define are equal
21
}
22
23
#ifndef NOSTREAMIO
24
template
<
class
T>
25
void
AFactor<T>::print
(
OSTREAM
&
s
)
const
26
{
27
if
(
exp
() == 1 )
28
s
<<
"("
<<
factor
() <<
", "
<< minpoly() <<
")"
;
29
else
30
s
<<
"(("
<<
factor
() <<
")^"
<<
exp
() <<
", "
<< minpoly() <<
")"
;
31
}
32
33
template
<
class
T>
34
OSTREAM
&
operator<<
(
OSTREAM
& os,
const
AFactor<T>
&
f
)
35
{
36
f
.print( os );
37
return
os;
38
}
39
#endif
/* NOSTREAMIO */
AFactor::minpoly
T minpoly() const
Definition:
ftmpl_afactor.h:30
f
FILE * f
Definition:
checklibs.c:9
operator==
int operator==(const AFactor< T > &f1, const AFactor< T > &f2)
Definition:
ftmpl_afactor.cc:18
AFactor::factor
T factor() const
Definition:
ftmpl_afactor.h:29
ftmpl_afactor.h
AFactor
Definition:
ftmpl_afactor.h:17
operator<<
OSTREAM & operator<<(OSTREAM &os, const AFactor< T > &f)
Definition:
ftmpl_afactor.cc:34
AFactor::exp
int exp() const
Definition:
ftmpl_afactor.h:31
AFactor::operator=
AFactor< T > & operator=(const AFactor< T > &)
Definition:
ftmpl_afactor.cc:6
exp
gmp_float exp(const gmp_float &a)
Definition:
mpr_complex.cc:357
factor
CanonicalForm factor
Definition:
facAbsFact.cc:101
AFactor::print
void print(OSTREAM &) const
Definition:
ftmpl_afactor.cc:25
s
const CanonicalForm int s
Definition:
facAbsFact.cc:55
OSTREAM
#define OSTREAM
Definition:
canonicalform.h:16
Generated on Wed Jan 29 2020 08:34:04 for My Project by
doxygen 1.8.16
for
Singular debian-1:4.1.1-p2+ds-4build1