Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members

root_of_unity Class Reference

#include <root_of_unity.h>

List of all members.

Public Member Functions

 root_of_unity (unsigned l, unsigned k)
void archive (GiNaC::archive_node &node) const
void read_archive (const GiNaC::archive_node &node, GiNaC::lst &sym_lst)
unsigned return_type (void) const
void print (const GiNaC::print_context &c, unsigned level=0) const
unsigned precedence (void) const
GiNaC::ex eval (int level=0) const
GiNaC::ex subs (const GiNaC::exmap &m, unsigned options=0) const

Protected Member Functions

GiNaC::ex eval_ncmul (const GiNaC::exvector &v) const
GiNaC::ex derivative (const GiNaC::symbol &s) const
unsigned calchash (void) const

Protected Attributes

unsigned l
unsigned k


Detailed Description

A root of unity is defined by

\[ r_k^l = \exp \left( \frac{2 \pi i l}{k} \right) \]


Member Function Documentation

ex eval int  level = 0  )  const
 

The following simplifications are done:

  • If $l = 0$ return 1.

  • If $l > k$, the root of unity is reduced to $r_k^{l'}$, where $ l' = l \; \mbox{mod} \; k$.

  • If $\mbox{gcd}(l,k) \neq 1$ the gcd is divided out.

ex eval_ncmul const GiNaC::exvector &  v  )  const [protected]
 

Multiplication is done according to

\[ r_{k_1}^{l_1} r_{k_2}^{l_2} = \exp \left( 2 \pi i \frac{k_2 l_1 + k_1 l_2}{k_1 k_2} \right) \]


The documentation for this class was generated from the following files:
Generated on Wed Jun 10 22:59:11 2009 for Nestedsums library by doxygen 1.3.7