GiNaC  1.6.2
Classes | Namespaces | Defines | Typedefs | Functions
utils.h File Reference

Interface to several small and furry utilities needed within GiNaC but not of any interest to the user of the library. More...

#include "assertion.h"
#include <functional>
#include <string>

Go to the source code of this file.

Classes

class  GiNaC::dunno
 Exception class thrown by functions to signal unimplemented functionality so the expression may just be .hold() More...

Namespaces

namespace  GiNaC
 

CRC32 hash function.


Defines

#define DEFAULT_CTOR(classname)   classname::classname() { setflag(status_flags::evaluated | status_flags::expanded); }
#define DEFAULT_COMPARE(classname)
#define DEFAULT_PRINT(classname, text)
#define DEFAULT_PRINT_LATEX(classname, text, latex)

Typedefs

typedef unsigned long GiNaC::p_int

Functions

unsigned GiNaC::log2 (unsigned n)
 Integer binary logarithm.
unsigned GiNaC::rotate_left (unsigned n)
 Rotate bits of unsigned value by one bit to the left.
template<class T >
int GiNaC::compare_pointers (const T *a, const T *b)
 Compare two pointers (just to establish some sort of canonical order).
unsigned GiNaC::golden_ratio_hash (p_int n)
 Truncated multiplication with golden ratio, for computing hash values.
template<class It >
int GiNaC::permutation_sign (It first, It last)
template<class It , class Cmp , class Swap >
int GiNaC::permutation_sign (It first, It last, Cmp comp, Swap swapit)
template<class It , class Cmp , class Swap >
void GiNaC::shaker_sort (It first, It last, Cmp comp, Swap swapit)
template<class It , class Swap >
void GiNaC::cyclic_permutation (It first, It last, It new_first, Swap swapit)

Detailed Description

Interface to several small and furry utilities needed within GiNaC but not of any interest to the user of the library.

Definition in file utils.h.


Define Documentation

#define DEFAULT_CTOR (   classname)    classname::classname() { setflag(status_flags::evaluated | status_flags::expanded); }

Definition at line 418 of file utils.h.

#define DEFAULT_COMPARE (   classname)
Value:
int classname::compare_same_type(const basic & other) const \
{ \
    /* by default, the objects are always identical */ \
    return 0; \
}

Definition at line 421 of file utils.h.

#define DEFAULT_PRINT (   classname,
  text 
)
Value:
void classname::do_print(const print_context & c, unsigned level) const \
{ \
    c.s << text; \
}

Definition at line 428 of file utils.h.

#define DEFAULT_PRINT_LATEX (   classname,
  text,
  latex 
)
Value:
DEFAULT_PRINT(classname, text) \
void classname::do_print_latex(const print_latex & c, unsigned level) const \
{ \
    c.s << latex; \
}

Definition at line 434 of file utils.h.


This page is part of the GiNaC developer's reference. It was generated automatically by doxygen. For an introduction, see the tutorial.