GiNaC 1.8.9
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 <cstdint>
#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...
 
class  GiNaC::basic_partition_generator
 Base class for generating all bounded combinatorial partitions of an integer n with exactly m parts in non-decreasing order. More...
 
struct  GiNaC::basic_partition_generator::mpartition2
 
class  GiNaC::partition_with_zero_parts_generator
 Generate all bounded combinatorial partitions of an integer n with exactly m parts (including zero parts) in non-decreasing order. More...
 
class  GiNaC::partition_generator
 Generate all bounded combinatorial partitions of an integer n with exactly m parts (not including zero parts) in non-decreasing order. More...
 
class  GiNaC::composition_generator
 Generate all compositions of a partition of an integer n, starting with the compositions which has non-decreasing order. More...
 
struct  GiNaC::composition_generator::coolmulti
 
struct  GiNaC::composition_generator::coolmulti::element
 

Namespaces

namespace  GiNaC
 

Macros

#define DEFAULT_CTOR(classname)
 
#define DEFAULT_COMPARE(classname)
 
#define DEFAULT_PRINT(classname, text)
 
#define DEFAULT_PRINT_LATEX(classname, text, latex)
 

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 (uintptr_t 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)
 
const numeric GiNaC::multinomial_coefficient (const std::vector< unsigned > &p)
 Compute the multinomial coefficient n!
 

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.

Macro Definition Documentation

◆ DEFAULT_CTOR

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

Definition at line 606 of file utils.h.

◆ DEFAULT_COMPARE

#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 609 of file utils.h.

◆ DEFAULT_PRINT

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

Definition at line 616 of file utils.h.

◆ DEFAULT_PRINT_LATEX

#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; \
}
#define DEFAULT_PRINT(classname, text)
Definition utils.h:616

Definition at line 622 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.