sparse_polynom.hpp File Reference

#include "config.hpp"
#include <iostream>
#include <list>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include "frwrddecl.hpp"
#include "type_traits.hpp"
#include "exception.hpp"
#include "refcntr.hpp"
#include "iteradapt.hpp"
#include "type_opers.hpp"
#include "factory.hpp"
#include "cmp.hpp"
#include "io.hpp"
#include "powerest.hpp"
#include "big_int.hpp"
#include "rational.hpp"
#include "_utility.hpp"
#include "std_import.hpp"
#include "sparse_polynom.cpp"

Go to the source code of this file.

Namespaces

namespace  Arageli
namespace  std

Classes

class  Arageli::monom< F, I >
 Monom template definition. More...
struct  Arageli::type_traits< monom< F, I > >
struct  Arageli::factory< monom< F, I > >
struct  Arageli::monom_degree_less< M1, M2 >
 Binary predicate for two monoms for degrees comparision. More...
struct  Arageli::monom_degree_equal< M1, M2 >
 Binary predicate for two monoms for equality degrees determination. More...
struct  Arageli::coef_extractor< M >
 Унарный функтор: по моному возвращает ссылку на его коэффициент. More...
struct  Arageli::degree_extractor< M >
 Унарный функтор: по моному возвращает ссылку на его степень. More...
struct  Arageli::norm_monom_seq_t
 Type for helper object norm_monom_seq. More...
struct  Arageli::any_monom_seq_t
 Type for helper object any_monom_seq. More...
struct  Arageli::sparse_polynom_base
 Base for all sparse polynomials. More...
class  Arageli::sparse_polynom_base::exception
 Exception of sparse_polynom. More...
class  Arageli::sparse_polynom_base::division_by_zero
 Возникает при делении на нулевой полином. More...
class  Arageli::sparse_polynom_base::zero_in_zero_degree
 Возникает при возвединии нулевого полинома в нулевую степень. More...
class  Arageli::sparse_polynom< F, I, REFCNT >
struct  Arageli::sparse_polynom< F, I, REFCNT >::other_coef< F1 >
struct  Arageli::factory< sparse_polynom< F, I, REFCNT > >
struct  Arageli::type_traits< sparse_polynom< F, I, REFCNT > >

Sorted and nonsorted helper objects.

#define _ARAGELI_POLYNOM_BINOPER(AOPER, BOPER)
enum  Arageli::monoms_order { Arageli::mo_inc, Arageli::mo_dec }
template<typename F, typename I, bool REFCNT>
sparse_polynom< F, I, REFCNT > Arageli::diff (const sparse_polynom< F, I, REFCNT > &x)
 Pefrorms differentiation of polynomial x by common symbolic rules.
template<typename F, typename I, bool REFCNT, typename Ch, typename ChT>
std::basic_ostream< Ch, ChT > & Arageli::output_list (std::basic_ostream< Ch, ChT > &out, const sparse_polynom< F, I, REFCNT > &x, monoms_order mo=mo_inc, const char *first_bracket=monom_output_list_first_bracket_default, const char *second_bracket=monom_output_list_second_bracket_default, const char *separator=monom_output_list_separator_default)
 Simple outputting as monom list.
template<typename F, typename I, bool REFCNT, typename Ch, typename ChT>
std::basic_ostream< Ch, ChT > & Arageli::output_var (std::basic_ostream< Ch, ChT > &out, const sparse_polynom< F, I, REFCNT > &x, monoms_order mo=mo_inc, const char *var=monom_output_var_var_default, const char *mul=monom_output_var_mul_default, const char *pow=monom_output_var_pow_default)
 Outputting of polynomial with variable symbol.
template<typename F, typename I, bool REFCNT, typename Ch, typename ChT>
std::basic_istream< Ch, ChT > & Arageli::input_list (std::basic_istream< Ch, ChT > &in, sparse_polynom< F, I, REFCNT > &x, const char *first_bracket=monom_input_list_first_bracket_default, const char *second_bracket=monom_input_list_second_bracket_default, const char *separator=monom_input_list_separator_default)
 Simple inputting of a polynomial.
template<typename F, typename I, bool REFCNT, typename Ch, typename ChT, typename Coef_factory>
std::basic_istream< Ch, ChT > & Arageli::input_var (std::basic_istream< Ch, ChT > &in, sparse_polynom< F, I, REFCNT > &x, const Coef_factory &fctr, const char *var=monom_input_var_var_default, const char *mul=monom_input_var_mul_default, const char *pow=monom_input_var_pow_default)
 Inputting of a polynomial with variable symbol.
template<typename F, typename I, bool REFCNT, typename Ch, typename ChT>
std::basic_istream< Ch, ChT > & Arageli::input_var (std::basic_istream< Ch, ChT > &in, sparse_polynom< F, I, REFCNT > &x, const char *var=monom_input_var_var_default, const char *mul=monom_input_var_mul_default, const char *pow=monom_input_var_pow_default)
 Inputting of a polynomial with variable symbol.
template<typename Ch, typename ChT, typename F, typename I, bool REFCNT>
std::basic_ostream< Ch, ChT > & Arageli::output_aligned (std::basic_ostream< Ch, ChT > &out, const sparse_polynom< F, I, REFCNT > &x, monoms_order mo=mo_inc, const char *var=monom_output_var_var_default, const char *mul=monom_output_var_mul_default, const char *pow=monom_output_var_pow_default)
 Oputputs polynomial in aligned form. (Restricted implementation.).
template<typename F, typename I, bool REFCNT, typename Ch, typename ChT>
std::basic_ostream< Ch, ChT > & Arageli::operator<< (std::basic_ostream< Ch, ChT > &out, const sparse_polynom< F, I, REFCNT > &x)
 Станартный вывод полинома. Совпадает с sparse_polynom_output_var.
template<typename F, typename I, bool REFCNT, typename Ch, typename ChT>
std::basic_istream< Ch, ChT > & Arageli::operator>> (std::basic_istream< Ch, ChT > &in, sparse_polynom< F, I, REFCNT > &x)
 Станартный вывод полинома. Совпадает с sparse_polynom_input_var.
static const norm_monom_seq_t Arageli::norm_monom_seq = norm_monom_seq_t()
 Helper object for choosing method that gives sorted monom sequence.
static const any_monom_seq_t Arageli::any_monom_seq = any_monom_seq_t()
 Helper object for choosing method that gives unsorted monom sequence.

Standard comparision operators that based on cmp function.

template<typename F1, typename I1, typename F2, typename I2>
bool Arageli::operator== (const monom< F1, I1 > &a, const monom< F2, I2 > &b)
template<typename F1, typename I1, typename F2>
bool Arageli::operator== (const monom< F1, I1 > &a, const F2 &b)
template<typename F1, typename F2, typename I2>
bool Arageli::operator== (const F1 &a, const monom< F2, I2 > &b)
template<typename F1, typename I1, typename F2, typename I2>
bool Arageli::operator!= (const monom< F1, I1 > &a, const monom< F2, I2 > &b)
template<typename F1, typename I1, typename F2>
bool Arageli::operator!= (const monom< F1, I1 > &a, const F2 &b)
template<typename F1, typename F2, typename I2>
bool Arageli::operator!= (const F1 &a, const monom< F2, I2 > &b)
template<typename F1, typename I1, typename F2, typename I2>
bool Arageli::operator<= (const monom< F1, I1 > &a, const monom< F2, I2 > &b)
template<typename F1, typename I1, typename F2>
bool Arageli::operator<= (const monom< F1, I1 > &a, const F2 &b)
template<typename F1, typename F2, typename I2>
bool Arageli::operator<= (const F1 &a, const monom< F2, I2 > &b)
template<typename F1, typename I1, typename F2, typename I2>
bool Arageli::operator>= (const monom< F1, I1 > &a, const monom< F2, I2 > &b)
template<typename F1, typename I1, typename F2>
bool Arageli::operator>= (const monom< F1, I1 > &a, const F2 &b)
template<typename F1, typename F2, typename I2>
bool Arageli::operator>= (const F1 &a, const monom< F2, I2 > &b)
template<typename F1, typename I1, typename F2, typename I2>
bool Arageli::operator< (const monom< F1, I1 > &a, const monom< F2, I2 > &b)
template<typename F1, typename I1, typename F2>
bool Arageli::operator< (const monom< F1, I1 > &a, const F2 &b)
template<typename F1, typename F2, typename I2>
bool Arageli::operator< (const F1 &a, const monom< F2, I2 > &b)
template<typename F1, typename I1, typename F2, typename I2>
bool Arageli::operator> (const monom< F1, I1 > &a, const monom< F2, I2 > &b)
template<typename F1, typename I1, typename F2>
bool Arageli::operator> (const monom< F1, I1 > &a, const F2 &b)
template<typename F1, typename F2, typename I2>
bool Arageli::operator> (const F1 &a, const monom< F2, I2 > &b)

Дополнительные операторы для мономов; сочетание со скаляром.

template<typename F1, typename I1, typename F2, typename I2>
monom< F1, I1 > Arageli::operator+ (const monom< F1, I1 > &x, const monom< F2, I2 > &y)
template<typename F1, typename I1, typename F2>
monom< F1, I1 > Arageli::operator+ (const monom< F1, I1 > &x, const F2 &y)
template<typename F1, typename F2, typename I2>
monom< F2, I2 > Arageli::operator+ (const F1 &x, const monom< F2, I2 > &y)
template<typename F1, typename I1, typename F2, typename I2>
monom< F1, I1 > Arageli::operator- (const monom< F1, I1 > &x, const monom< F2, I2 > &y)
template<typename F1, typename I1, typename F2>
monom< F1, I1 > Arageli::operator- (const monom< F1, I1 > &x, const F2 &y)
template<typename F1, typename F2, typename I2>
monom< F2, I2 > Arageli::operator- (const F1 &x, const monom< F2, I2 > &y)
template<typename F1, typename I1, typename F2, typename I2>
monom< F1, I1 > Arageli::operator * (const monom< F1, I1 > &x, const monom< F2, I2 > &y)
template<typename F1, typename I1, typename F2>
monom< F1, I1 > Arageli::operator * (const monom< F1, I1 > &x, const F2 &y)
template<typename F1, typename F2, typename I2>
monom< F2, I2 > Arageli::operator * (const F1 &x, const monom< F2, I2 > &y)
template<typename F1, typename I1, typename F2, typename I2>
monom< F1, I1 > Arageli::operator/ (const monom< F1, I1 > &x, const monom< F2, I2 > &y)
template<typename F1, typename I1, typename F2>
monom< F1, I1 > Arageli::operator/ (const monom< F1, I1 > &x, const F2 &y)
template<typename F1, typename F2, typename I2>
monom< F2, I2 > Arageli::operator/ (const F1 &x, const monom< F2, I2 > &y)
template<typename F1, typename I1, typename F2, typename I2>
monom< F1, I1 > Arageli::operator% (const monom< F1, I1 > &x, const monom< F2, I2 > &y)
template<typename F1, typename I1, typename F2>
monom< F1, I1 > Arageli::operator% (const monom< F1, I1 > &x, const F2 &y)
template<typename F1, typename F2, typename I2>
monom< F2, I2 > Arageli::operator% (const F1 &x, const monom< F2, I2 > &y)

Дополнительные операторы для мономов; сочетание со скаляром.

template<typename F1, typename I1, bool REFCNT1, typename F2, typename I2, bool REFCNT2>
sparse_polynom< F1, I1, REFCNT1 > Arageli::operator+ (const sparse_polynom< F1, I1, REFCNT1 > &x, const sparse_polynom< F2, I2, REFCNT2 > &y)
template<typename F1, typename I1, bool REFCNT1, typename F2, typename I2>
sparse_polynom< F1, I1, REFCNT1 > Arageli::operator+ (const sparse_polynom< F1, I1, REFCNT1 > &x, const monom< F2, I2 > &y)
template<typename F1, typename I1, typename F2, typename I2, bool REFCNT2>
sparse_polynom< F2, I2, REFCNT2 > Arageli::operator+ (const monom< F1, I1 > &x, const sparse_polynom< F2, I2, REFCNT2 > &y)
template<typename F1, typename I1, bool REFCNT1, typename F2>
sparse_polynom< F1, I1, REFCNT1 > Arageli::operator+ (const sparse_polynom< F1, I1, REFCNT1 > &x, const F2 &y)
template<typename F1, typename F2, typename I2, bool REFCNT2>
sparse_polynom< F2, I2, REFCNT2 > Arageli::operator+ (const F1 &x, const sparse_polynom< F2, I2, REFCNT2 > &y)
template<typename F1, typename I1, bool REFCNT1>
sparse_polynom< rational<
F1 >, I1, REFCNT1 > 
Arageli::operator+ (const sparse_polynom< rational< F1 >, I1, REFCNT1 > &x, const rational< F1 > &y)
template<typename F1, typename I1, bool REFCNT1>
sparse_polynom< rational<
F1 >, I1, REFCNT1 > 
Arageli::operator+ (const rational< F1 > &x, const sparse_polynom< rational< F1 >, I1, REFCNT1 > &y)
template<typename F1, typename I1, bool REFCNT1, typename F2, typename I2, bool REFCNT2>
sparse_polynom< F1, I1, REFCNT1 > Arageli::operator- (const sparse_polynom< F1, I1, REFCNT1 > &x, const sparse_polynom< F2, I2, REFCNT2 > &y)
template<typename F1, typename I1, bool REFCNT1, typename F2, typename I2>
sparse_polynom< F1, I1, REFCNT1 > Arageli::operator- (const sparse_polynom< F1, I1, REFCNT1 > &x, const monom< F2, I2 > &y)
template<typename F1, typename I1, typename F2, typename I2, bool REFCNT2>
sparse_polynom< F2, I2, REFCNT2 > Arageli::operator- (const monom< F1, I1 > &x, const sparse_polynom< F2, I2, REFCNT2 > &y)
template<typename F1, typename I1, bool REFCNT1, typename F2>
sparse_polynom< F1, I1, REFCNT1 > Arageli::operator- (const sparse_polynom< F1, I1, REFCNT1 > &x, const F2 &y)
template<typename F1, typename F2, typename I2, bool REFCNT2>
sparse_polynom< F2, I2, REFCNT2 > Arageli::operator- (const F1 &x, const sparse_polynom< F2, I2, REFCNT2 > &y)
template<typename F1, typename I1, bool REFCNT1>
sparse_polynom< rational<
F1 >, I1, REFCNT1 > 
Arageli::operator- (const sparse_polynom< rational< F1 >, I1, REFCNT1 > &x, const rational< F1 > &y)
template<typename F1, typename I1, bool REFCNT1>
sparse_polynom< rational<
F1 >, I1, REFCNT1 > 
Arageli::operator- (const rational< F1 > &x, const sparse_polynom< rational< F1 >, I1, REFCNT1 > &y)
template<typename F1, typename I1, bool REFCNT1, typename F2, typename I2, bool REFCNT2>
sparse_polynom< F1, I1, REFCNT1 > Arageli::operator * (const sparse_polynom< F1, I1, REFCNT1 > &x, const sparse_polynom< F2, I2, REFCNT2 > &y)
template<typename F1, typename I1, bool REFCNT1, typename F2, typename I2>
sparse_polynom< F1, I1, REFCNT1 > Arageli::operator * (const sparse_polynom< F1, I1, REFCNT1 > &x, const monom< F2, I2 > &y)
template<typename F1, typename I1, typename F2, typename I2, bool REFCNT2>
sparse_polynom< F2, I2, REFCNT2 > Arageli::operator * (const monom< F1, I1 > &x, const sparse_polynom< F2, I2, REFCNT2 > &y)
template<typename F1, typename I1, bool REFCNT1, typename F2>
sparse_polynom< F1, I1, REFCNT1 > Arageli::operator * (const sparse_polynom< F1, I1, REFCNT1 > &x, const F2 &y)
template<typename F1, typename F2, typename I2, bool REFCNT2>
sparse_polynom< F2, I2, REFCNT2 > Arageli::operator * (const F1 &x, const sparse_polynom< F2, I2, REFCNT2 > &y)
template<typename F1, typename I1, bool REFCNT1>
sparse_polynom< rational<
F1 >, I1, REFCNT1 > 
Arageli::operator * (const sparse_polynom< rational< F1 >, I1, REFCNT1 > &x, const rational< F1 > &y)
template<typename F1, typename I1, bool REFCNT1>
sparse_polynom< rational<
F1 >, I1, REFCNT1 > 
Arageli::operator * (const rational< F1 > &x, const sparse_polynom< rational< F1 >, I1, REFCNT1 > &y)
template<typename F1, typename I1, bool REFCNT1, typename F2, typename I2, bool REFCNT2>
sparse_polynom< F1, I1, REFCNT1 > Arageli::operator/ (const sparse_polynom< F1, I1, REFCNT1 > &x, const sparse_polynom< F2, I2, REFCNT2 > &y)
template<typename F1, typename I1, bool REFCNT1, typename F2, typename I2>
sparse_polynom< F1, I1, REFCNT1 > Arageli::operator/ (const sparse_polynom< F1, I1, REFCNT1 > &x, const monom< F2, I2 > &y)
template<typename F1, typename I1, typename F2, typename I2, bool REFCNT2>
sparse_polynom< F2, I2, REFCNT2 > Arageli::operator/ (const monom< F1, I1 > &x, const sparse_polynom< F2, I2, REFCNT2 > &y)
template<typename F1, typename I1, bool REFCNT1, typename F2>
sparse_polynom< F1, I1, REFCNT1 > Arageli::operator/ (const sparse_polynom< F1, I1, REFCNT1 > &x, const F2 &y)
template<typename F1, typename F2, typename I2, bool REFCNT2>
sparse_polynom< F2, I2, REFCNT2 > Arageli::operator/ (const F1 &x, const sparse_polynom< F2, I2, REFCNT2 > &y)
template<typename F1, typename I1, bool REFCNT1>
sparse_polynom< rational<
F1 >, I1, REFCNT1 > 
Arageli::operator/ (const sparse_polynom< rational< F1 >, I1, REFCNT1 > &x, const rational< F1 > &y)
template<typename F1, typename I1, bool REFCNT1>
sparse_polynom< rational<
F1 >, I1, REFCNT1 > 
Arageli::operator/ (const rational< F1 > &x, const sparse_polynom< rational< F1 >, I1, REFCNT1 > &y)
template<typename F1, typename I1, bool REFCNT1, typename F2, typename I2, bool REFCNT2>
sparse_polynom< F1, I1, REFCNT1 > Arageli::operator% (const sparse_polynom< F1, I1, REFCNT1 > &x, const sparse_polynom< F2, I2, REFCNT2 > &y)
template<typename F1, typename I1, bool REFCNT1, typename F2, typename I2>
sparse_polynom< F1, I1, REFCNT1 > Arageli::operator% (const sparse_polynom< F1, I1, REFCNT1 > &x, const monom< F2, I2 > &y)
template<typename F1, typename I1, typename F2, typename I2, bool REFCNT2>
sparse_polynom< F2, I2, REFCNT2 > Arageli::operator% (const monom< F1, I1 > &x, const sparse_polynom< F2, I2, REFCNT2 > &y)
template<typename F1, typename I1, bool REFCNT1, typename F2>
sparse_polynom< F1, I1, REFCNT1 > Arageli::operator% (const sparse_polynom< F1, I1, REFCNT1 > &x, const F2 &y)
template<typename F1, typename F2, typename I2, bool REFCNT2>
sparse_polynom< F2, I2, REFCNT2 > Arageli::operator% (const F1 &x, const sparse_polynom< F2, I2, REFCNT2 > &y)
template<typename F1, typename I1, bool REFCNT1>
sparse_polynom< rational<
F1 >, I1, REFCNT1 > 
Arageli::operator% (const sparse_polynom< rational< F1 >, I1, REFCNT1 > &x, const rational< F1 > &y)
template<typename F1, typename I1, bool REFCNT1>
sparse_polynom< rational<
F1 >, I1, REFCNT1 > 
Arageli::operator% (const rational< F1 > &x, const sparse_polynom< rational< F1 >, I1, REFCNT1 > &y)

Standard comparision operators that based on cmp function.

template<typename F1, typename I1, bool REFCNT1, typename F2, typename I2, bool REFCNT2>
bool Arageli::operator== (const sparse_polynom< F1, I1, REFCNT1 > &a, const sparse_polynom< F2, I2, REFCNT2 > &b)
template<typename F1, typename I1, bool REFCNT1, typename F2, typename I2>
bool Arageli::operator== (const sparse_polynom< F1, I1, REFCNT1 > &a, const monom< F2, I2 > &b)
template<typename F1, typename I1, typename F2, typename I2, bool REFCNT2>
bool Arageli::operator== (const monom< F1, I1 > &a, const sparse_polynom< F2, I2, REFCNT2 > &b)
template<typename F1, typename I1, bool REFCNT1, typename F2>
bool Arageli::operator== (const sparse_polynom< F1, I1, REFCNT1 > &a, const F2 &b)
template<typename F1, typename F2, typename I2, bool REFCNT2>
bool Arageli::operator== (const F1 &a, const sparse_polynom< F2, I2, REFCNT2 > &b)
template<typename F1, typename I1, bool REFCNT1, typename F2, typename I2, bool REFCNT2>
bool Arageli::operator!= (const sparse_polynom< F1, I1, REFCNT1 > &a, const sparse_polynom< F2, I2, REFCNT2 > &b)
template<typename F1, typename I1, bool REFCNT1, typename F2, typename I2>
bool Arageli::operator!= (const sparse_polynom< F1, I1, REFCNT1 > &a, const monom< F2, I2 > &b)
template<typename F1, typename I1, typename F2, typename I2, bool REFCNT2>
bool Arageli::operator!= (const monom< F1, I1 > &a, const sparse_polynom< F2, I2, REFCNT2 > &b)
template<typename F1, typename I1, bool REFCNT1, typename F2>
bool Arageli::operator!= (const sparse_polynom< F1, I1, REFCNT1 > &a, const F2 &b)
template<typename F1, typename F2, typename I2, bool REFCNT2>
bool Arageli::operator!= (const F1 &a, const sparse_polynom< F2, I2, REFCNT2 > &b)
template<typename F1, typename I1, bool REFCNT1, typename F2, typename I2, bool REFCNT2>
bool Arageli::operator<= (const sparse_polynom< F1, I1, REFCNT1 > &a, const sparse_polynom< F2, I2, REFCNT2 > &b)
template<typename F1, typename I1, bool REFCNT1, typename F2, typename I2>
bool Arageli::operator<= (const sparse_polynom< F1, I1, REFCNT1 > &a, const monom< F2, I2 > &b)
template<typename F1, typename I1, typename F2, typename I2, bool REFCNT2>
bool Arageli::operator<= (const monom< F1, I1 > &a, const sparse_polynom< F2, I2, REFCNT2 > &b)
template<typename F1, typename I1, bool REFCNT1, typename F2>
bool Arageli::operator<= (const sparse_polynom< F1, I1, REFCNT1 > &a, const F2 &b)
template<typename F1, typename F2, typename I2, bool REFCNT2>
bool Arageli::operator<= (const F1 &a, const sparse_polynom< F2, I2, REFCNT2 > &b)
template<typename F1, typename I1, bool REFCNT1, typename F2, typename I2, bool REFCNT2>
bool Arageli::operator>= (const sparse_polynom< F1, I1, REFCNT1 > &a, const sparse_polynom< F2, I2, REFCNT2 > &b)
template<typename F1, typename I1, bool REFCNT1, typename F2, typename I2>
bool Arageli::operator>= (const sparse_polynom< F1, I1, REFCNT1 > &a, const monom< F2, I2 > &b)
template<typename F1, typename I1, typename F2, typename I2, bool REFCNT2>
bool Arageli::operator>= (const monom< F1, I1 > &a, const sparse_polynom< F2, I2, REFCNT2 > &b)
template<typename F1, typename I1, bool REFCNT1, typename F2>
bool Arageli::operator>= (const sparse_polynom< F1, I1, REFCNT1 > &a, const F2 &b)
template<typename F1, typename F2, typename I2, bool REFCNT2>
bool Arageli::operator>= (const F1 &a, const sparse_polynom< F2, I2, REFCNT2 > &b)
template<typename F1, typename I1, bool REFCNT1, typename F2, typename I2, bool REFCNT2>
bool Arageli::operator< (const sparse_polynom< F1, I1, REFCNT1 > &a, const sparse_polynom< F2, I2, REFCNT2 > &b)
template<typename F1, typename I1, bool REFCNT1, typename F2, typename I2>
bool Arageli::operator< (const sparse_polynom< F1, I1, REFCNT1 > &a, const monom< F2, I2 > &b)
template<typename F1, typename I1, typename F2, typename I2, bool REFCNT2>
bool Arageli::operator< (const monom< F1, I1 > &a, const sparse_polynom< F2, I2, REFCNT2 > &b)
template<typename F1, typename I1, bool REFCNT1, typename F2>
bool Arageli::operator< (const sparse_polynom< F1, I1, REFCNT1 > &a, const F2 &b)
template<typename F1, typename F2, typename I2, bool REFCNT2>
bool Arageli::operator< (const F1 &a, const sparse_polynom< F2, I2, REFCNT2 > &b)
template<typename F1, typename I1, bool REFCNT1, typename F2, typename I2, bool REFCNT2>
bool Arageli::operator> (const sparse_polynom< F1, I1, REFCNT1 > &a, const sparse_polynom< F2, I2, REFCNT2 > &b)
template<typename F1, typename I1, bool REFCNT1, typename F2, typename I2>
bool Arageli::operator> (const sparse_polynom< F1, I1, REFCNT1 > &a, const monom< F2, I2 > &b)
template<typename F1, typename I1, typename F2, typename I2, bool REFCNT2>
bool Arageli::operator> (const monom< F1, I1 > &a, const sparse_polynom< F2, I2, REFCNT2 > &b)
template<typename F1, typename I1, bool REFCNT1, typename F2>
bool Arageli::operator> (const sparse_polynom< F1, I1, REFCNT1 > &a, const F2 &b)
template<typename F1, typename F2, typename I2, bool REFCNT2>
bool Arageli::operator> (const F1 &a, const sparse_polynom< F2, I2, REFCNT2 > &b)

Defines

#define _ARAGELI_MONOM_CMP(OPER)
#define _ARAGELI_MONOM_BINOPER(AOPER, BOPER)
#define _ARAGELI_SPARSE_POLYNOMIAL_CMP(OPER)
#define ARAGELI_INCLUDE_CPP_WITH_EXPORT_TEMPLATE_SPARSE_POLYNOM

Functions

template<typename F, typename I>
bool Arageli::is_unit (const monom< F, I > &x)
template<typename F, typename I>
bool Arageli::is_opposite_unit (const monom< F, I > &x)
template<typename F, typename I>
bool Arageli::is_null (const monom< F, I > &x)
template<typename F, typename I>
monom< F, I > Arageli::opposite (const monom< F, I > &x)
template<typename F, typename I>
monom< F, I > & Arageli::opposite (const monom< F, I > &x, monom< F, I > *y)
template<typename F, typename I>
monom< F, I > & Arageli::opposite (monom< F, I > *x)
template<typename F, typename I>
monom< F, I > Arageli::inverse (const monom< F, I > &x)
template<typename F, typename I>
monom< F, I > & Arageli::inverse (const monom< F, I > &x, monom< F, I > *y)
template<typename F, typename I>
monom< F, I > & Arageli::inverse (monom< F, I > *x)
template<typename F, typename I>
std::ostream & Arageli::output_polynom_first (std::ostream &out, const monom< F, I > &x)
template<typename F, typename I>
std::ostream & Arageli::output_polynom_internal (std::ostream &out, const monom< F, I > &x)
template<typename F, typename I>
std::ostream & Arageli::output_pow (std::ostream &out, const monom< F, I > &x)
template<typename F, typename I>
std::istream & Arageli::input_polynom_first (std::istream &in, monom< F, I > &x)
template<typename F, typename I>
std::istream & Arageli::input_polynom_internal (std::istream &in, monom< F, I > &x)
template<typename F, typename I>
std::istream & Arageli::input_pow (std::istream &in, monom< F, I > &x)
template<typename F1, typename I1, typename F2, typename I2>
int Arageli::cmp (const monom< F1, I1 > &m1, const monom< F2, I2 > &m2)
template<typename F1, typename I1, typename F2>
int Arageli::cmp (const monom< F1, I1 > &m1, const F2 &b)
template<typename F1, typename F2, typename I2>
int Arageli::cmp (const F1 &a, const monom< F2, I2 > &m2)
template<typename F, typename I, typename Factory_coef>
int Arageli::sign (const monom< F, I > &x)
 Determines the sign of monom, i.e. sign of the its coefficient.
template<typename Ch, typename ChT, typename F, typename I>
std::basic_ostream< Ch, ChT > & Arageli::output_list (std::basic_ostream< Ch, ChT > &out, const monom< F, I > &x, const char *first_bracket=monom_output_list_first_bracket_default, const char *second_bracket=monom_output_list_second_bracket_default, const char *separator=monom_output_list_separator_default)
 Simple outputting of monom.
template<typename Ch, typename ChT, typename F, typename I>
std::basic_ostream< Ch, ChT > & Arageli::output_var (std::basic_ostream< Ch, ChT > &out, const monom< F, I > &x, bool first_a=true, const char *var=monom_output_var_var_default, const char *mul=monom_output_var_mul_default, const char *pow=monom_output_var_pow_default)
 Выводит моном в привычном виде, с указанием формальной переменной.
template<typename Ch, typename ChT, typename F, typename I>
std::basic_istream< Ch, ChT > & Arageli::input_list (std::basic_istream< Ch, ChT > &in, monom< F, I > &x, const char *first_bracket=monom_input_list_first_bracket_default, const char *second_bracket=monom_input_list_second_bracket_default, const char *separator=monom_input_list_separator_default)
 Simple intputting for monom.
template<typename Ch, typename ChT, typename F, typename I, typename Factory_coef>
std::basic_istream< Ch, ChT > & Arageli::input_var (std::basic_istream< Ch, ChT > &in, monom< F, I > &x, bool first_a, const Factory_coef &fctr, const char *var=monom_input_var_var_default, const char *mul=monom_input_var_mul_default, const char *pow=monom_input_var_pow_default)
 Inputting with variable symbol for monom.
template<typename Ch, typename ChT, typename F, typename I>
std::basic_istream< Ch, ChT > & Arageli::input_var (std::basic_istream< Ch, ChT > &in, monom< F, I > &x, bool first_a=true, const char *var=monom_input_var_var_default, const char *mul=monom_input_var_mul_default, const char *pow=monom_input_var_pow_default)
 Inputting with variable symbol for monom.
template<typename Ch, typename ChT, typename F, typename I>
std::basic_ostream< Ch, ChT > & Arageli::output_aligned (std::basic_ostream< Ch, ChT > &out, const monom< F, I > &x, bool first_a=true, const char *var=monom_output_var_var_default, const char *mul=monom_output_var_mul_default, const char *pow=monom_output_var_pow_default)
 Oputputs monom in aligned form. (Restricted implementation.).
template<typename F, typename I, typename Ch, typename ChT>
std::basic_ostream< Ch, ChT > & Arageli::operator<< (std::basic_ostream< Ch, ChT > &out, const monom< F, I > &x)
 Стандартный способ вывода монома: совпадает с output_var.
template<typename F, typename I, typename Ch, typename ChT>
std::basic_istream< Ch, ChT > & Arageli::operator>> (std::basic_istream< Ch, ChT > &in, monom< F, I > &x)
 Стандартный способ ввода монома: совпадает с input_var.
template<typename F1, typename I1, bool REFCNT1, typename F2, typename I2, bool REFCNT2>
int Arageli::cmp (const sparse_polynom< F1, I1, REFCNT1 > &a, const sparse_polynom< F2, I2, REFCNT2 > &b)
 Lexicographical comparision of two polynomials.
template<typename F, typename I, bool REFCNT>
bool Arageli::is_primitive (const sparse_polynom< F, I, REFCNT > &x)
template<typename F, typename I, bool REFCNT>
bool Arageli::is_unit (const sparse_polynom< F, I, REFCNT > &x)
template<typename F, typename I, bool REFCNT>
bool Arageli::is_opposite_unit (const sparse_polynom< F, I, REFCNT > &x)
template<typename F, typename I, bool REFCNT>
bool Arageli::is_null (const sparse_polynom< F, I, REFCNT > &x)
template<typename F, typename I, bool REFCNT>
sparse_polynom< F, I, REFCNT > Arageli::opposite (const sparse_polynom< F, I, REFCNT > &x)
template<typename F, typename I, bool REFCNT>
sparse_polynom< F, I, REFCNT > & Arageli::opposite (const sparse_polynom< F, I, REFCNT > &x, sparse_polynom< F, I, REFCNT > *y)
template<typename F, typename I, bool REFCNT>
sparse_polynom< F, I, REFCNT > & Arageli::opposite (sparse_polynom< F, I, REFCNT > *x)
template<typename F, typename I, bool REFCNT>
sparse_polynom< F, I, REFCNT > Arageli::inverse (const sparse_polynom< F, I, REFCNT > &x)
template<typename F, typename I, bool REFCNT>
sparse_polynom< F, I, REFCNT > & Arageli::inverse (const sparse_polynom< F, I, REFCNT > &x, sparse_polynom< F, I, REFCNT > *y)
template<typename F, typename I, bool REFCNT>
sparse_polynom< F, I, REFCNT > & Arageli::inverse (sparse_polynom< F, I, REFCNT > *x)
template<typename F, typename I, bool REFCNT>
std::ostream & Arageli::output_polynom_first (std::ostream &out, const sparse_polynom< F, I, REFCNT > &x)
template<typename F, typename I, bool REFCNT>
std::ostream & Arageli::output_polynom_internal (std::ostream &out, const sparse_polynom< F, I, REFCNT > &x)
template<typename F, typename I, bool REFCNT>
std::ostream & Arageli::output_pow (std::ostream &out, const sparse_polynom< F, I, REFCNT > &x)
template<typename F, typename I, bool REFCNT>
std::istream & Arageli::input_polynom_first (std::istream &in, sparse_polynom< F, I, REFCNT > &x)
template<typename F, typename I, bool REFCNT>
std::istream & Arageli::input_polynom_internal (std::istream &in, sparse_polynom< F, I, REFCNT > &x)
template<typename F, typename I, bool REFCNT>
std::istream & Arageli::input_pow (std::istream &in, sparse_polynom< F, I, REFCNT > &x)
template<typename F, typename I, bool REFCNT>
sparse_polynom< F, I, REFCNT > Arageli::euclid (sparse_polynom< F, I, REFCNT > a, sparse_polynom< F, I, REFCNT > b)
 Specialization of euclid for sparse_polynom.
template<typename F, typename I, bool REFCNT>
bool Arageli::is_coprime (const sparse_polynom< F, I, REFCNT > &a, const sparse_polynom< F, I, REFCNT > &b)
 Specialization of is_coprime for sparse_polynom.
template<typename F1, typename I1, bool REFCNT1, typename F2, typename I2, bool REFCNT2, typename Q, typename R>
void Arageli::prdivide (const sparse_polynom< F1, I1, REFCNT1 > &a, const sparse_polynom< F2, I2, REFCNT2 > &b, Q &q, R &r)
template<typename F1, typename I1, bool REFCNT1, typename I2>
sparse_polynom< F1, I1, REFCNT1 > Arageli::pow (const sparse_polynom< F1, I1, REFCNT1 > &a, const I2 &n)
template<typename F, typename I>
monom< F, I > Arageli::abs (const monom< F, I > &x)
 Absolute value for monom.
template<typename F, typename I, bool REFCNT>
sparse_polynom< F, I, REFCNT > Arageli::abs (const sparse_polynom< F, I, REFCNT > &x)
 Absolute value for polynomial.
template<typename F1, typename I1, bool REFCNT1, typename I2>
Arageli::sparse_polynom< F1,
I1, REFCNT1 > 
std::pow (const Arageli::sparse_polynom< F1, I1, REFCNT1 > &a, const I2 &n)
template<typename F1, typename I1, typename F2, typename I2>
void std::swap (Arageli::monom< F1, I1 > &a, Arageli::monom< F2, I2 > &b)
template<typename F1, typename I1, bool REFCNT1, typename F2, typename I2, bool REFCNT2>
void std::swap (Arageli::sparse_polynom< F1, I1, REFCNT1 > &a, Arageli::sparse_polynom< F2, I2, REFCNT2 > &b)
template<typename F, typename I>
void std::swap (Arageli::monom< F, I > &a, Arageli::monom< F, I > &b)
template<typename F, typename I, bool REFCNT>
void std::swap (Arageli::sparse_polynom< F, I, REFCNT > &a, Arageli::sparse_polynom< F, I, REFCNT > &b)
template<typename F, typename I>
Arageli::monom< F, I > std::abs (const Arageli::monom< F, I > &x)
 Absolute value for monom.
template<typename F, typename I, bool REFCNT>
Arageli::sparse_polynom< F,
I, REFCNT > 
std::abs (const Arageli::sparse_polynom< F, I, REFCNT > &x)
 Absolute value for polynomial.

Variables

const char * Arageli::monom_input_list_first_bracket_default
const char * Arageli::monom_output_list_first_bracket_default
const char * Arageli::monom_input_list_second_bracket_default
const char * Arageli::monom_output_list_second_bracket_default
const char * Arageli::monom_input_list_separator_default
const char * Arageli::monom_output_list_separator_default
const char * Arageli::monom_input_var_mul_default
const char * Arageli::monom_output_var_mul_default
const char * Arageli::monom_input_var_var_default
const char * Arageli::monom_output_var_var_default
const char * Arageli::monom_input_var_pow_default
const char * Arageli::monom_output_var_pow_default


Detailed Description

Sparse polinomial and related classes and operations definition. This file contains following definitions for following class templates: monom, sparse_polynom and the partialy specialization of type_traits template for monom and sparse_polynom. Generaly sparse polynomial is a list of monoms with appropriate type for coefficient and degree.

Definition in file sparse_polynom.hpp.


Define Documentation

#define _ARAGELI_MONOM_BINOPER ( AOPER,
BOPER   ) 

Definition at line 766 of file sparse_polynom.hpp.

#define _ARAGELI_MONOM_CMP ( OPER   ) 

Value:

template <typename F1, typename I1, typename F2, typename I2>           \
    inline bool operator OPER                                               \
    (const monom<F1, I1>& a, const monom<F2, I2>& b)                        \
    { return cmp(a, b) OPER 0; }                                            \
                                                                            \
    template <typename F1, typename I1, typename F2>                        \
    inline bool operator OPER                                               \
    (                                                                       \
        const monom<F1, I1>& a,                                             \
        const F2& b                                                         \
    )                                                                       \
    { return cmp(a, b) OPER 0; }                                            \
                                                                            \
    template <typename F1, typename F2, typename I2>                        \
    inline bool operator OPER                                               \
    (                                                                       \
        const F1& a,                                                        \
        const monom<F2, I2>& b                                              \
    )                                                                       \
    { return cmp(a, b) OPER 0; }

Definition at line 550 of file sparse_polynom.hpp.

#define _ARAGELI_POLYNOM_BINOPER ( AOPER,
BOPER   ) 

Definition at line 1884 of file sparse_polynom.hpp.

#define _ARAGELI_SPARSE_POLYNOMIAL_CMP ( OPER   ) 

Definition at line 2075 of file sparse_polynom.hpp.

#define ARAGELI_INCLUDE_CPP_WITH_EXPORT_TEMPLATE_SPARSE_POLYNOM

Definition at line 2615 of file sparse_polynom.hpp.


Generated on Thu Aug 31 17:38:18 2006 for Arageli by  doxygen 1.4.7