Back to index

Public Member Functions | Private Attributes
polynomial_function_rep< T > Class Template Reference

#include <function_extra.hpp>

Inheritance diagram for polynomial_function_rep< T >:
Inheritance graph
Collaboration diagram for polynomial_function_rep< T >:
Collaboration graph

List of all members.

Public Member Functions

 polynomial_function_rep (polynomial< T > p2)
T apply (T x)
ball< Tapply (ball< T > x)
function< T, Tderive (typename properties< T >::index_type var)
tree expression ()
virtual T apply (F x)=0
virtual ball< Tapply (ball< F > x)=0
virtual function< F, Tderive (V var)=0

Private Attributes

polynomial< Tp

Detailed Description

template<typename T>
class polynomial_function_rep< T >

Definition at line 136 of file function_extra.hpp.

Constructor & Destructor Documentation

template<typename T >
polynomial_function_rep< T >::polynomial_function_rep ( polynomial< T p2) [inline]

Definition at line 139 of file function_extra.hpp.

: p (p2) {}

Member Function Documentation

virtual T function_rep::apply ( x) [pure virtual, inherited]
virtual ball<T> function_rep::apply ( ball< F >  x) [pure virtual, inherited]
template<typename T >
T polynomial_function_rep< T >::apply ( T  x) [inline]

Definition at line 140 of file function_extra.hpp.

{ return p (x); }
template<typename T >
ball<T> polynomial_function_rep< T >::apply ( ball< T x) [inline]

Definition at line 141 of file function_extra.hpp.

    int i, n= N(p);
    if (n == 0) return 0;
    T* a= A(p);
    ball<T> sum= a[n-1];
    for (i=n-2; i>=0; i--)
      sum = x * sum + ball<T> (a[i]);
    return sum; }

Here is the call graph for this function:

virtual function<F,T> function_rep::derive ( V  var) [pure virtual, inherited]
template<typename T >
function<T,T> polynomial_function_rep< T >::derive ( typename properties< T >::index_type  var) [inline]

Definition at line 149 of file function_extra.hpp.

    return polynomial_function<T> (::derive (p)); }
template<typename T >
tree polynomial_function_rep< T >::expression ( ) [inline, virtual]

Implements function_rep< T, T >.

Definition at line 151 of file function_extra.hpp.

    return compound ("as_function", as_tree (p)); }

Here is the call graph for this function:

Member Data Documentation

template<typename T >
polynomial<T> polynomial_function_rep< T >::p [private]

Definition at line 137 of file function_extra.hpp.

The documentation for this class was generated from the following file: