Loading...
Searching...
No Matches
ftmpl_afactor.h
Go to the documentation of this file.
/* emacs edit mode for this file is -*- C++ -*- */
#ifndef INCL_AFACTOR_H
#define INCL_AFACTOR_H
#ifndef NOSTREAMIO
#ifdef HAVE_IOSTREAM
#include <iostream>
#define OSTREAM std::ostream
#elif defined(HAVE_IOSTREAM_H)
#include <iostream.h>
#define OSTREAM ostream
#endif
#endif /* NOSTREAMIO */
template <class T>
class AFactor {
private:
T _factor;
T _minpoly;
int _exp;
public:
AFactor() : _factor(1), _minpoly (1), _exp(0) {}
AFactor( const AFactor<T> & f ) : _factor(f._factor), _minpoly (f._minpoly), _exp(f._exp) {}
AFactor( const T & f, const T & m, int e ) : _factor(f), _minpoly (m), _exp(e) {}
AFactor( const T & f, const T & m ) : _factor(f), _minpoly (m), _exp(1) {}
~AFactor() {}
AFactor<T>& operator= ( const AFactor<T>& );
T factor() const { return _factor; }
T minpoly() const { return _minpoly; }
int exp() const { return _exp; }
T value() const { return power( _factor, _exp ); }
#ifndef NOSTREAMIO
void print ( OSTREAM& ) const;
#endif /* NOSTREAMIO */
};
template <class T> int
operator== ( const AFactor<T>&, const AFactor<T>& );
#ifndef NOSTREAMIO
template <class T>
OSTREAM& operator<< ( OSTREAM & os, const AFactor<T> & f );
#endif /* NOSTREAMIO */
#endif /* ! INCL_AFACTOR_H */
power
CanonicalForm power(const CanonicalForm &f, int n)
exponentiation
Definition canonicalform.cc:1896
OSTREAM
#define OSTREAM
Definition canonicalform.h:16
m
int m
Definition cfEzgcd.cc:128
f
FILE * f
Definition checklibs.c:9
AFactor
Definition ftmpl_afactor.h:17
AFactor::minpoly
T minpoly() const
Definition ftmpl_afactor.h:30
AFactor::exp
int exp() const
Definition ftmpl_afactor.h:31
AFactor::factor
T factor() const
Definition ftmpl_afactor.h:29
AFactor< CanonicalForm >::_minpoly
CanonicalForm _minpoly
Definition ftmpl_afactor.h:20
AFactor< CanonicalForm >::_exp
int _exp
Definition ftmpl_afactor.h:21
AFactor::value
T value() const
Definition ftmpl_afactor.h:32
AFactor::AFactor
AFactor()
Definition ftmpl_afactor.h:23
AFactor< CanonicalForm >::_factor
CanonicalForm _factor
Definition ftmpl_afactor.h:19
AFactor::~AFactor
~AFactor()
Definition ftmpl_afactor.h:27
AFactor::print
void print(OSTREAM &) const
Definition ftmpl_afactor.cc:25
AFactor::AFactor
AFactor(const T &f, const T &m, int e)
Definition ftmpl_afactor.h:25
AFactor::operator=
AFactor< T > & operator=(const AFactor< T > &)
Definition ftmpl_afactor.cc:6
AFactor::AFactor
AFactor(const AFactor< T > &f)
Definition ftmpl_afactor.h:24
AFactor::AFactor
AFactor(const T &f, const T &m)
Definition ftmpl_afactor.h:26
operator<<
OSTREAM & operator<<(OSTREAM &os, const AFactor< T > &f)
Definition ftmpl_afactor.cc:34
operator==
int operator==(const AFactor< T > &, const AFactor< T > &)
Definition ftmpl_afactor.cc:18
T
STATIC_VAR jList * T
Definition janet.cc:30