factory
templates
ftmpl_factor.cc
Go to the documentation of this file.
1
/* emacs edit mode for this file is -*- C++ -*- */
2
3
#include <
factory/templates/ftmpl_factor.h
>
4
5
template
<
class
T>
6
Factor<T>
&
Factor<T>::operator=
(
const
Factor<T>
&
f
)
7
{
8
if
(
this
!= &f ) {
9
_factor = f.
_factor
;
10
_exp = f.
_exp
;
11
}
12
return
*
this
;
13
}
14
15
template
<
class
T>
16
Factor<T>
&
Factor<T>::operator=
(
const
T
&
f
)
17
{
18
_factor =
f
;
19
_exp = 1;
20
return
*
this
;
21
}
22
23
template
<
class
T>
24
int
operator==
(
const
Factor<T>
&f1,
const
Factor<T>
&f2 )
25
{
26
return
(f1.
exp
() == f2.
exp
()) && (f1.
factor
() == f2.
factor
());
27
}
28
29
#ifndef NOSTREAMIO
30
template
<
class
T>
31
void
Factor<T>::print
(
OSTREAM
&
s
)
const
32
{
33
if
(
exp
() == 1 )
34
s <<
factor
();
35
else
36
s <<
"("
<<
factor
() <<
")^"
<<
exp
();
37
}
38
39
template
<
class
T>
40
OSTREAM
& operator<< ( OSTREAM & os, const Factor<T> &
f
)
41
{
42
f
.print( os );
43
return
os;
44
}
45
#endif
/* NOSTREAMIO */
Factor::exp
int exp() const
Definition:
ftmpl_factor.h:33
s
const CanonicalForm int s
Definition:
facAbsFact.cc:55
Factor::factor
T factor() const
Definition:
ftmpl_factor.h:32
Factor::operator=
Factor< T > & operator=(const Factor< T > &)
Definition:
ftmpl_factor.cc:6
Factor::_factor
T _factor
Definition:
ftmpl_factor.h:22
ftmpl_factor.h
Factor
Definition:
ftmpl_factor.h:20
f
FILE * f
Definition:
checklibs.c:7
factor
CanonicalForm factor
Definition:
facAbsFact.cc:101
OSTREAM
#define OSTREAM
Definition:
canonicalform.h:16
exp
p exp[i]
Definition:
DebugPrint.cc:39
Factor::print
void print(OSTREAM &) const
Definition:
ftmpl_factor.cc:31
T
static jList * T
Definition:
janet.cc:37
Factor::_exp
int _exp
Definition:
ftmpl_factor.h:23
operator==
int operator==(const Factor< T > &f1, const Factor< T > &f2)
Definition:
ftmpl_factor.cc:24
Generated on Tue Nov 8 2016 15:29:55 by
doxygen 1.8.12
for
Singular debian-1:4.0.3-p3+ds-3