DGtal  1.4.beta
DGtal::Xe_kComputer< n, Ring, Alloc > Class Template Reference

#include <DGtal/math/MPolynomial.h>

Public Member Functions

 Xe_kComputer ()
 
MPolynomial< n, Ring, Alloc > get (unsigned int k, unsigned int e)
 

Detailed Description

template<int n, typename Ring, typename Alloc>
class DGtal::Xe_kComputer< n, Ring, Alloc >

Creates a monomial X_k^e

Template Parameters
nthe number of indetermionates.
Ringthe type for the coefficent ring of the polynomial.
Allocthe type of allocator.

Definition at line 1613 of file MPolynomial.h.

Constructor & Destructor Documentation

◆ Xe_kComputer()

template<int n, typename Ring , typename Alloc >
DGtal::Xe_kComputer< n, Ring, Alloc >::Xe_kComputer ( )
inline

Definition at line 1616 of file MPolynomial.h.

1616 {}

Member Function Documentation

◆ get()

template<int n, typename Ring , typename Alloc >
MPolynomial<n, Ring, Alloc> DGtal::Xe_kComputer< n, Ring, Alloc >::get ( unsigned int  k,
unsigned int  e 
)
inline
Parameters
kthe index of the variable (X_k)
ethe exponent for X_k
Returns
the 1-variable polynomial X_0^e

Definition at line 1624 of file MPolynomial.h.

1625  {
1626  MPolynomial<n, Ring, Alloc> p;
1627  if ( k == 0 )
1628  p[e] = Xe_kComputer<n-1,Ring,Alloc>().get( k-1, e );
1629  else
1630  p[0] = Xe_kComputer<n-1,Ring,Alloc>().get( k-1, e );
1631  p.normalize();
1632  //std::cerr << "Xe_k(" << k << "," << e << ")=" << p << std::endl;
1633  return p;
1634  }
MPolynomial< n, Ring, Alloc > get(unsigned int k, unsigned int e)
Definition: MPolynomial.h:1624

Referenced by DGtal::Xe_k().


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