/usr/include/linbox/element/givaro-polynomial.h is in liblinbox-dev 1.1.6~rc0-4.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 52 53 54 55 56 57 58 59 60 | /* -*- mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/* linbox/element/givaro-polynomial.h
* Written by
* Clement Pernet
*
* See COPYING for license information.
*/
#ifndef __GIVAROPOLYNOMIAL_ELT_H
#define __GIVAROPOLYNOMIAL_ELT_H
#include <iostream>
#include "givaro/givpoly1.h"
// Namespace in which all LinBox code resides
namespace LinBox
{
/** \brief Polynomials over a domain
*
* @param Type of coefficients
\ingroup element
*/
template <typename T, class Alloc=std::allocator<T> >
class GivPolynomial : public givvector<T, Alloc>
{
typedef GivPolynomial<T, Alloc > Self_t;
public:
GivPolynomial () : givvector<T, Alloc>() {}
GivPolynomial (size_t s) : givvector<T, Alloc>(s) {}
GivPolynomial (const std::vector<T,Alloc>& p) : givvector<T,Alloc >(p, givWithCopy()) {}
GivPolynomial (const givvector<T,Alloc>& p) : givvector<T,Alloc >(p, givWithCopy()) {}
template<typename X>
struct rebind
{
typedef GivPolynomial<typename X::Element> other;
void operator() (other *& P2,
const Self_t& P1,
const X& F)
{
P2 = new other(P1.size());
typename Self_t::const_iterator it1 = P1.begin();
typename other::iterator it2 = P2->begin();
for (; it1 != P1.end(); ++it1, ++it2)
F.init (*it2, *it1);
// for (size_t i=0; i < P1.size(); ++i)
// F.init ( (*P2)[i], P1[i]);
}
};
};
} // namespace LinBox
#endif // __GIVAROPOLYNOMIAL_ELT_H
|