Arageli::algebraic< TP, TS, Poly, Seg, Config > Class Template Reference

Algebraic number class. More...

#include <algebraic.hpp>

List of all members.

Public Types

typedef TP base_type
typedef TS interval_limit_type
typedef Poly polynom_type
typedef Seg interval_type
typedef Config config_type

Public Member Functions

 algebraic ()
 Creates zero.
 algebraic (const TS &x)
 Creates number as just a copy of given value.
 algebraic (const Poly &px)
 Creates number as the minimal root of given polynomial.
 algebraic (const Poly &px, const Seg &s)
 operator double () const
const Poly & polynom () const
 Access to the polynomial.
const Seg & segment () const
 Access to the boundary segment.
Poly & polynom ()
 Access to the polynomial.
Seg & segment ()
 Access to the boundary segment.
bool is_normal () const
 Check if representation of the number is valid.
void normalize () const
 Performs normalization of the number.
algebraic operator- () const
const algebraicoperator+ () const
algebraicoperator++ ()
algebraicoperator-- ()
algebraic operator++ (int)
algebraic operator-- (int)
template<typename TP2, typename TS2, typename Poly2, typename Seg2, typename Cfg2>
algebraicoperator+= (const algebraic< TP2, TS2, Poly2, Seg2, Cfg2 > &x)
template<typename TP2, typename TS2, typename Poly2, typename Seg2, typename Cfg2>
algebraicoperator-= (const algebraic< TP2, TS2, Poly2, Seg2, Cfg2 > &x)
template<typename TP2, typename TS2, typename Poly2, typename Seg2, typename Cfg2>
algebraicoperator *= (const algebraic< TP2, TS2, Poly2, Seg2, Cfg2 > &x)
template<typename TP2, typename TS2, typename Poly2, typename Seg2, typename Cfg2>
algebraicoperator/= (const algebraic< TP2, TS2, Poly2, Seg2, Cfg2 > &x)
bool is_null () const
bool is_unit () const
bool is_opposite_unit () const
bool operator! () const
 operator bool () const


Detailed Description

template<typename TP = rational<>, typename TS = TP, typename Poly = sparse_polynom<TP>, typename Seg = interval<TS>, typename Config = algebraic_config_default<TP, TS, Poly, Seg>>
class Arageli::algebraic< TP, TS, Poly, Seg, Config >

Algebraic number class.

Definition at line 87 of file algebraic.hpp.


Member Typedef Documentation

template<typename TP = rational<>, typename TS = TP, typename Poly = sparse_polynom<TP>, typename Seg = interval<TS>, typename Config = algebraic_config_default<TP, TS, Poly, Seg>>
typedef TP Arageli::algebraic< TP, TS, Poly, Seg, Config >::base_type

Definition at line 98 of file algebraic.hpp.

template<typename TP = rational<>, typename TS = TP, typename Poly = sparse_polynom<TP>, typename Seg = interval<TS>, typename Config = algebraic_config_default<TP, TS, Poly, Seg>>
typedef Config Arageli::algebraic< TP, TS, Poly, Seg, Config >::config_type

Definition at line 102 of file algebraic.hpp.

template<typename TP = rational<>, typename TS = TP, typename Poly = sparse_polynom<TP>, typename Seg = interval<TS>, typename Config = algebraic_config_default<TP, TS, Poly, Seg>>
typedef TS Arageli::algebraic< TP, TS, Poly, Seg, Config >::interval_limit_type

Definition at line 99 of file algebraic.hpp.

template<typename TP = rational<>, typename TS = TP, typename Poly = sparse_polynom<TP>, typename Seg = interval<TS>, typename Config = algebraic_config_default<TP, TS, Poly, Seg>>
typedef Seg Arageli::algebraic< TP, TS, Poly, Seg, Config >::interval_type

Definition at line 101 of file algebraic.hpp.

template<typename TP = rational<>, typename TS = TP, typename Poly = sparse_polynom<TP>, typename Seg = interval<TS>, typename Config = algebraic_config_default<TP, TS, Poly, Seg>>
typedef Poly Arageli::algebraic< TP, TS, Poly, Seg, Config >::polynom_type

Definition at line 100 of file algebraic.hpp.


Constructor & Destructor Documentation

template<typename TP = rational<>, typename TS = TP, typename Poly = sparse_polynom<TP>, typename Seg = interval<TS>, typename Config = algebraic_config_default<TP, TS, Poly, Seg>>
Arageli::algebraic< TP, TS, Poly, Seg, Config >::algebraic (  )  [inline]

Creates zero.

Definition at line 105 of file algebraic.hpp.

template<typename TP = rational<>, typename TS = TP, typename Poly = sparse_polynom<TP>, typename Seg = interval<TS>, typename Config = algebraic_config_default<TP, TS, Poly, Seg>>
Arageli::algebraic< TP, TS, Poly, Seg, Config >::algebraic ( const TS &  x  )  [inline]

Creates number as just a copy of given value.

Definition at line 108 of file algebraic.hpp.

template<typename TP = rational<>, typename TS = TP, typename Poly = sparse_polynom<TP>, typename Seg = interval<TS>, typename Config = algebraic_config_default<TP, TS, Poly, Seg>>
Arageli::algebraic< TP, TS, Poly, Seg, Config >::algebraic ( const Poly &  px  )  [inline]

Creates number as the minimal root of given polynomial.

Definition at line 115 of file algebraic.hpp.

template<typename TP = rational<>, typename TS = TP, typename Poly = sparse_polynom<TP>, typename Seg = interval<TS>, typename Config = algebraic_config_default<TP, TS, Poly, Seg>>
Arageli::algebraic< TP, TS, Poly, Seg, Config >::algebraic ( const Poly &  px,
const Seg &  s 
) [inline]

Definition at line 124 of file algebraic.hpp.


Member Function Documentation

template<typename TP = rational<>, typename TS = TP, typename Poly = sparse_polynom<TP>, typename Seg = interval<TS>, typename Config = algebraic_config_default<TP, TS, Poly, Seg>>
bool Arageli::algebraic< TP, TS, Poly, Seg, Config >::is_normal (  )  const [inline]

Check if representation of the number is valid.

Definition at line 162 of file algebraic.hpp.

template<typename TP = rational<>, typename TS = TP, typename Poly = sparse_polynom<TP>, typename Seg = interval<TS>, typename Config = algebraic_config_default<TP, TS, Poly, Seg>>
bool Arageli::algebraic< TP, TS, Poly, Seg, Config >::is_null (  )  const [inline]

Definition at line 237 of file algebraic.hpp.

template<typename TP = rational<>, typename TS = TP, typename Poly = sparse_polynom<TP>, typename Seg = interval<TS>, typename Config = algebraic_config_default<TP, TS, Poly, Seg>>
bool Arageli::algebraic< TP, TS, Poly, Seg, Config >::is_opposite_unit (  )  const [inline]

Definition at line 240 of file algebraic.hpp.

template<typename TP = rational<>, typename TS = TP, typename Poly = sparse_polynom<TP>, typename Seg = interval<TS>, typename Config = algebraic_config_default<TP, TS, Poly, Seg>>
bool Arageli::algebraic< TP, TS, Poly, Seg, Config >::is_unit (  )  const [inline]

Definition at line 239 of file algebraic.hpp.

template<typename TP = rational<>, typename TS = TP, typename Poly = sparse_polynom<TP>, typename Seg = interval<TS>, typename Config = algebraic_config_default<TP, TS, Poly, Seg>>
void Arageli::algebraic< TP, TS, Poly, Seg, Config >::normalize (  )  const [inline]

Performs normalization of the number.

Definition at line 165 of file algebraic.hpp.

template<typename TP = rational<>, typename TS = TP, typename Poly = sparse_polynom<TP>, typename Seg = interval<TS>, typename Config = algebraic_config_default<TP, TS, Poly, Seg>>
template<typename TP2, typename TS2, typename Poly2, typename Seg2, typename Cfg2>
algebraic& Arageli::algebraic< TP, TS, Poly, Seg, Config >::operator *= ( const algebraic< TP2, TS2, Poly2, Seg2, Cfg2 > &  x  )  [inline]

Definition at line 220 of file algebraic.hpp.

template<typename TP = rational<>, typename TS = TP, typename Poly = sparse_polynom<TP>, typename Seg = interval<TS>, typename Config = algebraic_config_default<TP, TS, Poly, Seg>>
Arageli::algebraic< TP, TS, Poly, Seg, Config >::operator bool (  )  const [inline]

Definition at line 244 of file algebraic.hpp.

template<typename TP = rational<>, typename TS = TP, typename Poly = sparse_polynom<TP>, typename Seg = interval<TS>, typename Config = algebraic_config_default<TP, TS, Poly, Seg>>
Arageli::algebraic< TP, TS, Poly, Seg, Config >::operator double (  )  const [inline]

Definition at line 131 of file algebraic.hpp.

template<typename TP = rational<>, typename TS = TP, typename Poly = sparse_polynom<TP>, typename Seg = interval<TS>, typename Config = algebraic_config_default<TP, TS, Poly, Seg>>
bool Arageli::algebraic< TP, TS, Poly, Seg, Config >::operator! (  )  const [inline]

Definition at line 243 of file algebraic.hpp.

template<typename TP = rational<>, typename TS = TP, typename Poly = sparse_polynom<TP>, typename Seg = interval<TS>, typename Config = algebraic_config_default<TP, TS, Poly, Seg>>
const algebraic& Arageli::algebraic< TP, TS, Poly, Seg, Config >::operator+ (  )  const [inline]

Definition at line 184 of file algebraic.hpp.

template<typename TP = rational<>, typename TS = TP, typename Poly = sparse_polynom<TP>, typename Seg = interval<TS>, typename Config = algebraic_config_default<TP, TS, Poly, Seg>>
algebraic Arageli::algebraic< TP, TS, Poly, Seg, Config >::operator++ ( int   )  [inline]

Definition at line 198 of file algebraic.hpp.

template<typename TP = rational<>, typename TS = TP, typename Poly = sparse_polynom<TP>, typename Seg = interval<TS>, typename Config = algebraic_config_default<TP, TS, Poly, Seg>>
algebraic& Arageli::algebraic< TP, TS, Poly, Seg, Config >::operator++ (  )  [inline]

Definition at line 186 of file algebraic.hpp.

template<typename TP = rational<>, typename TS = TP, typename Poly = sparse_polynom<TP>, typename Seg = interval<TS>, typename Config = algebraic_config_default<TP, TS, Poly, Seg>>
template<typename TP2, typename TS2, typename Poly2, typename Seg2, typename Cfg2>
algebraic& Arageli::algebraic< TP, TS, Poly, Seg, Config >::operator+= ( const algebraic< TP2, TS2, Poly2, Seg2, Cfg2 > &  x  )  [inline]

Definition at line 202 of file algebraic.hpp.

template<typename TP = rational<>, typename TS = TP, typename Poly = sparse_polynom<TP>, typename Seg = interval<TS>, typename Config = algebraic_config_default<TP, TS, Poly, Seg>>
algebraic Arageli::algebraic< TP, TS, Poly, Seg, Config >::operator- (  )  const [inline]

Definition at line 168 of file algebraic.hpp.

template<typename TP = rational<>, typename TS = TP, typename Poly = sparse_polynom<TP>, typename Seg = interval<TS>, typename Config = algebraic_config_default<TP, TS, Poly, Seg>>
algebraic Arageli::algebraic< TP, TS, Poly, Seg, Config >::operator-- ( int   )  [inline]

Definition at line 199 of file algebraic.hpp.

template<typename TP = rational<>, typename TS = TP, typename Poly = sparse_polynom<TP>, typename Seg = interval<TS>, typename Config = algebraic_config_default<TP, TS, Poly, Seg>>
algebraic& Arageli::algebraic< TP, TS, Poly, Seg, Config >::operator-- (  )  [inline]

Definition at line 192 of file algebraic.hpp.

template<typename TP = rational<>, typename TS = TP, typename Poly = sparse_polynom<TP>, typename Seg = interval<TS>, typename Config = algebraic_config_default<TP, TS, Poly, Seg>>
template<typename TP2, typename TS2, typename Poly2, typename Seg2, typename Cfg2>
algebraic& Arageli::algebraic< TP, TS, Poly, Seg, Config >::operator-= ( const algebraic< TP2, TS2, Poly2, Seg2, Cfg2 > &  x  )  [inline]

Definition at line 211 of file algebraic.hpp.

template<typename TP = rational<>, typename TS = TP, typename Poly = sparse_polynom<TP>, typename Seg = interval<TS>, typename Config = algebraic_config_default<TP, TS, Poly, Seg>>
template<typename TP2, typename TS2, typename Poly2, typename Seg2, typename Cfg2>
algebraic& Arageli::algebraic< TP, TS, Poly, Seg, Config >::operator/= ( const algebraic< TP2, TS2, Poly2, Seg2, Cfg2 > &  x  )  [inline]

Definition at line 229 of file algebraic.hpp.

template<typename TP = rational<>, typename TS = TP, typename Poly = sparse_polynom<TP>, typename Seg = interval<TS>, typename Config = algebraic_config_default<TP, TS, Poly, Seg>>
Poly& Arageli::algebraic< TP, TS, Poly, Seg, Config >::polynom (  )  [inline]

Access to the polynomial.

Definition at line 151 of file algebraic.hpp.

template<typename TP = rational<>, typename TS = TP, typename Poly = sparse_polynom<TP>, typename Seg = interval<TS>, typename Config = algebraic_config_default<TP, TS, Poly, Seg>>
const Poly& Arageli::algebraic< TP, TS, Poly, Seg, Config >::polynom (  )  const [inline]

Access to the polynomial.

Definition at line 141 of file algebraic.hpp.

template<typename TP = rational<>, typename TS = TP, typename Poly = sparse_polynom<TP>, typename Seg = interval<TS>, typename Config = algebraic_config_default<TP, TS, Poly, Seg>>
Seg& Arageli::algebraic< TP, TS, Poly, Seg, Config >::segment (  )  [inline]

Access to the boundary segment.

Definition at line 158 of file algebraic.hpp.

template<typename TP = rational<>, typename TS = TP, typename Poly = sparse_polynom<TP>, typename Seg = interval<TS>, typename Config = algebraic_config_default<TP, TS, Poly, Seg>>
const Seg& Arageli::algebraic< TP, TS, Poly, Seg, Config >::segment (  )  const [inline]

Access to the boundary segment.

Definition at line 148 of file algebraic.hpp.


The documentation for this class was generated from the following file:
Generated on Thu Aug 31 17:38:22 2006 for Arageli by  doxygen 1.4.7