/usr/include/singular/factory/templates/ftmpl_factor.h is in libsingular4-dev-common 4.0.3+ds-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | /* emacs edit mode for this file is -*- C++ -*- */
#ifndef INCL_FACTOR_H
#define INCL_FACTOR_H
// #include <factory/factoryconf.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 Factor {
private:
T _factor;
int _exp;
public:
Factor() : _factor(1), _exp(0) {}
Factor( const Factor<T> & f ) : _factor(f._factor), _exp(f._exp) {}
Factor( const T & f, int e ) : _factor(f), _exp(e) {}
Factor( const T & f ) : _factor(f), _exp(1) {}
~Factor() {}
Factor<T>& operator= ( const Factor<T>& );
Factor<T>& operator= ( const T& );
T factor() const { return _factor; }
int exp() const { return _exp; }
T value() const { return power( _factor, _exp ); }
Factor<T>& operator+= ( int i ) { _exp += i; return *this; }
Factor<T>& operator*= ( int i ) { _exp *= i; return *this; }
Factor<T>& operator*= ( const T & f ) { _factor *= f; return *this; }
#ifndef NOSTREAMIO
void print ( OSTREAM& ) const;
#endif /* NOSTREAMIO */
};
template <class T> int
operator== ( const Factor<T>&, const Factor<T>& );
#ifndef NOSTREAMIO
template <class T>
OSTREAM& operator<< ( OSTREAM & os, const Factor<T> & f );
#endif /* NOSTREAMIO */
#endif /* ! INCL_FACTOR_H */
|