NGSolve  5.3
Classes | Typedefs | Functions | Variables
ngstd Namespace Reference

Standard Data Types and Algorithms. More...

Classes

class  FlatTable
class  Table
 A compact Table container. More...
class  TableCreator
class  FilteredTableCreator
class  BaseDynamicTable
 Base class to generic DynamicTable. More...
class  DynamicTable
 A dynamic table class. More...
class  ArrayRangeException
 Exception thrown by array range check. More...
class  BaseArrayObject
class  AOWrapperIterator
class  AOWrapper
class  CArray
 nothing more but a new type for a C array. More...
class  ArrayIterator
class  ArrayRangeIterator
class  T_Range
 a range of intergers More...
class  IndirectArray
class  FlatArray
 A simple array container. More...
class  Array
 Dynamic array container. More...
class  ArrayMem
 Array with static and dynamic memory management. More...
class  DefaultLessCl
class  SumArray
class  AutoDiffDiff
 Datatype for automatic differentiation. More...
class  AutoDiff
 Datatype for automatic differentiation. More...
class  AutoPtr
 Pointer to object. More...
class  BitArray
 A compressed array of bools. More...
class  BlockAllocator
 Optimized memory handler. More...
class  GenericVariable
class  EvalFunction
 Numerical expression parser. More...
class  Exception
 Base class for all ng exceptions. More...
class  RangeException
 Out of range exception used for arrays, vectors and matrices. More...
class  Flags
 A storage for command-line flags. More...
class  INT
 N integers. More...
class  HashTable
 A hash-table. More...
class  ClosedHashTable
 A closed hash-table. More...
class  LocalHeapOverflow
 Exception on heap overflow. More...
class  LocalHeap
 Optimized memory handler. More...
class  LocalHeapMem
 Optimized memory handler. More...
class  HeapReset
 A reset for the heap-pointer of a LocalHeap. More...
class  MemoryUsageStruct
 Reports amount of used memory. More...
class  NgProfiler
 A built-in profile. More...
class  Timer
class  RegionTimer
 Timer object. More...
class  BaseStatusHandler
 Access to statusbar. More...
class  BaseSymbolTable
 Base class for generic SymbolTable. More...
class  SymbolTable
 A symbol table. More...
class  Cl_Iterate
class  Cl_Iterate< 0 >

Typedefs

typedef DynamicTable< int > IntTable

Functions

template<class T >
ostream & operator<< (ostream &s, const Table< T > &table)
 Print table.
template<class T >
ostream & operator<< (ostream &s, const DynamicTable< T > &table)
 Print table.
template<typename T >
ostream & operator<< (ostream &ost, const BaseArrayObject< T > &array)
template<typename T >
INLINE AOWrapper< T > ArrayObject (const T &ar)
template<typename T >
T_Range< T > OmpSplit (T_Range< T > r)
template<typename T >
auto OmpSplit (const T &data)-> decltype(data.OmpSplit())
template<typename T >
INLINE T_Range< T > Range (T a, T b)
template<typename T >
INLINE T_Range< T > Range_impl (T n, std::true_type)
template<typename T >
INLINE auto Range_impl (const T &ao, std::false_type)-> T_Range< decltype(ao.Size())>
template<typename T >
auto Range (const T &x)-> decltype(Range_impl(x
INLINE IntRange operator+ (const IntRange &range, int shift)
INLINE IntRange operator+ (int shift, const IntRange &range)
INLINE IntRange operator* (int scale, const IntRange &range)
INLINE IntRange operator* (const IntRange &range, int scale)
ostream & operator<< (ostream &s, const IntRange &ir)
template<typename... ARGS>
ostream & operator<< (ostream &ost, Tuple< IntRange, ARGS...> tup)
template<class T >
ostream & operator<< (ostream &s, const FlatArray< T > &a)
 print array
template<class T1 , class T2 >
bool operator== (const FlatArray< T1 > &a1, const FlatArray< T2 > &a2)
 have arrays the same contents ?
template<typename... ARGS>
int ArraySize (Tuple< ARGS...> tup)
template<typename... ARGS>
int ArraySize (Tuple< int, ARGS...> tup)
template<typename... ARGS>
int ArraySize (Tuple< IntRange, ARGS...> tup)
template<typename... ARGS>
void StoreToArray (FlatArray< int > a, Tuple< ARGS...> tup)
template<typename... ARGS>
void StoreToArray (FlatArray< int > a, Tuple< int, ARGS...> tup)
template<typename... ARGS>
void StoreToArray (FlatArray< int > a, Tuple< IntRange, ARGS...> tup)
template<typename T2 >
Array< int > & operator+= (Array< int > &array, const BaseArrayObject< T2 > &a2)
template<class T >
void BubbleSort (const FlatArray< T > &data)
 bubble sort array
template<class T , class S >
void BubbleSort (FlatArray< T > &data, FlatArray< S > &slave)
 bubble sort array
template<class T , typename TLESS >
void QuickSort (FlatArray< T > data, TLESS less)
template<typename T >
INLINE bool DefaultLess (const T &a, const T &b)
template<class T >
INLINE void QuickSort (FlatArray< T > data)
template<class T , typename TLESS >
void QuickSortI (FlatArray< T > data, FlatArray< int > index, TLESS less)
template<class T >
INLINE void QuickSortI (FlatArray< T > data, FlatArray< int > index)
template<typename T >
INLINE T xxxRemoveRef (const T &x)
template<class TA1 , class TA2 >
SumArray< TA1, TA2 > operator+ (const BaseArrayObject< TA1 > &a1, const BaseArrayObject< TA2 > &a2)
template<typename T , typename TSIZE >
Archive & operator& (Archive &archive, Array< T, TSIZE > &a)
NGS_DLL_HEADER ostream & operator<< (ostream &s, const BitArray &ba)
 prints BitArray
Archive & operator& (Archive &archive, BitArray &ba)
template<>
std::complex< double > GenericVariable::Value< std::complex< double > > (int i) const
ostream & operator<< (ostream &ost, const GenericVariable &var)
template<typename T >
Exceptionoperator<< (Exception &ex, T data)
ostream & operator<< (ostream &s, const Flags &flags)
 Print flags.
Archive & operator& (Archive &archive, Flags &flags)
template<int N, typename T >
ostream & operator<< (ostream &s, const INT< N, T > &i2)
 Print integers.
template<int N>
INLINE int HashValue (const INT< N > &ind, int size)
INLINE int HashValue (const INT< 1 > &ind, int size)
 hash value of 1 int
INLINE int HashValue (const INT< 2 > &ind, int size)
 hash value of 2 int
INLINE int HashValue (const INT< 3 > &ind, int size)
 hash value of 3 int
template<int D, typename T >
INLINE T Max (const INT< D, T > &i)
template<int D, typename T >
INLINE T Min (const INT< D, T > &i)
template<int D, typename T >
INLINE INT< D, T > Max (INT< D, T > i1, INT< D, T > i2)
template<int D, typename T >
INLINE INT< D, T > operator+ (INT< D, T > i1, INT< D, T > i2)
template<int N, typename T >
Archive & operator& (Archive &archive, INT< N, T > &mi)
NGS_DLL_HEADER bool StringFitsPattern (const string &str, const string &pattern)
template<typename T >
ostream & operator<< (ostream &ost, const SymbolTable< T > &st)
template<typename T >
Archive & operator& (Archive &ar, SymbolTable< T > &table)
template<class T >
INLINE T min2 (T a, T b)
 min of 2 values
template<class T >
INLINE T max2 (T a, T b)
 max of 2 values
template<class T >
INLINE T min3 (T a, T b, T c)
 min of 3 values
template<class T >
INLINE T max3 (T a, T b, T c)
 max of 3 values
template<class T >
INLINE void Swap (T &a, T &b)
 swap 2 elements.
template<class T >
INLINE int sgn (T a)
 sign of value (+1, 0, -1)
template<class T >
INLINE T sqr (const T a)
 square element
template<class T >
INLINE T pow3 (const T a)
 element to the third power
template<class T >
string ToString (const T &t)
template<class T >
void SaveBin (ostream &ost, const T &val)
template<class T >
void LoadBin (istream &ist, T &val)
template<int NUM, typename FUNC >
INLINE void Iterate (FUNC f)
template<int D>
ostream & operator<< (ostream &ost, const AutoDiffDiff< D > &x)
 Prints AudoDiffDiff.
template<int D>
AutoDiffDiff< D > operator+ (const AutoDiffDiff< D > &x, const AutoDiffDiff< D > &y) throw ()
template<int D>
AutoDiffDiff< D > operator- (const AutoDiffDiff< D > &x, const AutoDiffDiff< D > &y) throw ()
template<int D>
AutoDiffDiff< D > operator+ (double x, const AutoDiffDiff< D > &y) throw ()
template<int D>
AutoDiffDiff< D > operator+ (const AutoDiffDiff< D > &y, double x) throw ()
template<int D>
AutoDiffDiff< D > operator- (const AutoDiffDiff< D > &x) throw ()
template<int D>
AutoDiffDiff< D > operator- (const AutoDiffDiff< D > &x, double y) throw ()
template<int D>
AutoDiffDiff< D > operator- (double x, const AutoDiffDiff< D > &y) throw ()
template<int D>
AutoDiffDiff< D > operator* (double x, const AutoDiffDiff< D > &y) throw ()
template<int D>
AutoDiffDiff< D > operator* (const AutoDiffDiff< D > &y, double x) throw ()
template<int D>
AutoDiffDiff< D > operator* (const AutoDiffDiff< D > &x, const AutoDiffDiff< D > &y) throw ()
template<int D>
AutoDiffDiff< D > Inv (const AutoDiffDiff< D > &x)
template<int D>
AutoDiffDiff< D > operator/ (const AutoDiffDiff< D > &x, const AutoDiffDiff< D > &y)
template<int D>
AutoDiffDiff< D > operator/ (const AutoDiffDiff< D > &x, double y)
template<int D>
AutoDiffDiff< D > operator/ (double x, const AutoDiffDiff< D > &y)
template<int D>
AutoDiffDiff< D > sqrt (const AutoDiffDiff< D > &x)
template<int D, typename SCAL >
ostream & operator<< (ostream &ost, const AutoDiff< D, SCAL > &x)
 prints AutoDiff
template<int D, typename SCAL >
INLINE AutoDiff< D, SCAL > operator+ (const AutoDiff< D, SCAL > &x, const AutoDiff< D, SCAL > &y) throw ()
 AutoDiff plus AutoDiff.
template<int D, typename SCAL >
INLINE AutoDiff< D, SCAL > operator- (const AutoDiff< D, SCAL > &x, const AutoDiff< D, SCAL > &y) throw ()
 AutoDiff minus AutoDiff.
template<int D, typename SCAL >
INLINE AutoDiff< D, SCAL > operator+ (double x, const AutoDiff< D, SCAL > &y) throw ()
 double plus AutoDiff
template<int D, typename SCAL >
INLINE AutoDiff< D, SCAL > operator+ (const AutoDiff< D, SCAL > &y, double x) throw ()
 AutoDiff plus double.
template<int D, typename SCAL >
INLINE AutoDiff< D, SCAL > operator- (const AutoDiff< D, SCAL > &x) throw ()
 minus AutoDiff
template<int D, typename SCAL >
INLINE AutoDiff< D, SCAL > operator- (const AutoDiff< D, SCAL > &x, double y) throw ()
 AutoDiff minus double.
template<int D, typename SCAL >
INLINE AutoDiff< D, SCAL > operator- (double x, const AutoDiff< D, SCAL > &y) throw ()
template<int D, typename SCAL >
INLINE AutoDiff< D, SCAL > operator* (double x, const AutoDiff< D, SCAL > &y) throw ()
 double times AutoDiff
template<int D, typename SCAL >
INLINE AutoDiff< D, SCAL > operator* (const AutoDiff< D, SCAL > &y, double x) throw ()
 AutoDiff times double.
template<int D, typename SCAL >
INLINE AutoDiff< D, SCAL > operator* (const AutoDiff< D, SCAL > &x, const AutoDiff< D, SCAL > &y) throw ()
 AutoDiff times AutoDiff.
template<int D, typename SCAL >
INLINE AutoDiff< D, SCAL > sqr (const AutoDiff< D, SCAL > &x) throw ()
 AutoDiff times AutoDiff.
template<int D, typename SCAL >
INLINE AutoDiff< D, SCAL > Inv (const AutoDiff< D, SCAL > &x)
 Inverse of AutoDiff.
template<int D, typename SCAL >
INLINE AutoDiff< D, SCAL > operator/ (const AutoDiff< D, SCAL > &x, const AutoDiff< D, SCAL > &y)
 AutoDiff div AutoDiff.
template<int D, typename SCAL >
INLINE AutoDiff< D, SCAL > operator/ (const AutoDiff< D, SCAL > &x, double y)
 AutoDiff div double.
template<int D, typename SCAL >
INLINE AutoDiff< D, SCAL > operator/ (double x, const AutoDiff< D, SCAL > &y)
 double div AutoDiff
template<int D, typename SCAL , typename SCAL2 >
INLINE AutoDiff< D, SCAL > & operator+= (AutoDiff< D, SCAL > &x, SCAL2 y) throw ()
template<int D, typename SCAL >
INLINE AutoDiff< D, SCAL > & operator+= (AutoDiff< D, SCAL > &x, AutoDiff< D, SCAL > y)
template<int D, typename SCAL >
INLINE AutoDiff< D, SCAL > & operator-= (AutoDiff< D, SCAL > &x, AutoDiff< D, SCAL > y)
template<int D, typename SCAL , typename SCAL2 >
INLINE AutoDiff< D, SCAL > & operator-= (AutoDiff< D, SCAL > &x, SCAL2 y)
template<int D, typename SCAL >
INLINE AutoDiff< D, SCAL > & operator*= (AutoDiff< D, SCAL > &x, AutoDiff< D, SCAL > y)
template<int D, typename SCAL , typename SCAL2 >
INLINE AutoDiff< D, SCAL > & operator*= (AutoDiff< D, SCAL > &x, SCAL2 y)
template<int D, typename SCAL >
INLINE AutoDiff< D, SCAL > & operator/= (AutoDiff< D, SCAL > &x, SCAL y)
template<int D, typename SCAL >
INLINE bool operator== (AutoDiff< D, SCAL > x, SCAL val2)
template<int D, typename SCAL >
INLINE bool operator!= (AutoDiff< D, SCAL > x, SCAL val2) throw ()
template<int D, typename SCAL >
INLINE bool operator< (AutoDiff< D, SCAL > x, SCAL val2) throw ()
template<int D, typename SCAL >
INLINE bool operator> (AutoDiff< D, SCAL > x, SCAL val2) throw ()
template<int D, typename SCAL >
INLINE AutoDiff< D, SCAL > fabs (const AutoDiff< D, SCAL > &x)
template<int D, typename SCAL >
INLINE AutoDiff< D, SCAL > sqrt (const AutoDiff< D, SCAL > &x)
template<int D, typename SCAL >
AutoDiff< D, SCAL > log (AutoDiff< D, SCAL > x)

Variables

NGS_DLL_HEADER::std::ostream * testout
NGS_DLL_HEADER int printmessage_importance
const char dirslash = '/'

Detailed Description

Standard Data Types and Algorithms.

namespace for standard data types and algorithms.

The ngstd library contains generic container classes

It contains utility classes:

Generic container classes: FlatArray, Array, ArrayMem, Table, DynamicTable, HashTable, SymbolTable.

Specific data types Exception, BitArray, Flags, LocalHeap, BlockAllocator, NgProfiler, AutoPtr, EvalFunction, AutoDiff, AutoDiffDiff