spielwiese
Last change
on this file since f224fda was
f224fda,
checked in by Martin Lee <martinlee84@…>, 11 years ago
|
chg: added new templates to hold absolute factors
Conflicts:
factory/canonicalform.h
factory/ftmpl_inst.cc
|
-
Property mode set to
100644
|
File size:
685 bytes
|
Line | |
---|
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 | #ifndef NOSTREAMIO |
---|
18 | template <class T> |
---|
19 | void AFactor<T>::print ( OSTREAM& s ) const |
---|
20 | { |
---|
21 | if ( exp() == 1 ) |
---|
22 | s << "(" << factor(), ", " << minpoly() << ")"; |
---|
23 | else |
---|
24 | s << "((" << factor() << ")^" << exp() << ", " << minpoly() << ")"; |
---|
25 | } |
---|
26 | |
---|
27 | template <class T> |
---|
28 | OSTREAM& operator<< ( OSTREAM & os, const AFactor<T> & f ) |
---|
29 | { |
---|
30 | f.print( os ); |
---|
31 | return os; |
---|
32 | } |
---|
33 | #endif /* NOSTREAMIO */ |
---|
Note: See
TracBrowser
for help on using the repository browser.