All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Namespaces | Classes | Typedefs | Functions | Variables
Aux Namespace Reference

Namespaces

 Checkers
 This namespace provides some Types with a static member-function void enforce(bool) that may check wether the argument is true and create some kind of failure otherwise.
 
 Impl
 
 Log
 
 MissingMath
 Math functions not provided by the standard library.
 
 NumericTools
 Tools to deal with limited precision in numeric computations.
 
 Parallel
 
 Parsing
 
 Random
 Provides several functions for random-numbers.
 
 SignalHandling
 
 StringTools
 Missing string functions.
 

Classes

class  BloomFilter
 Bloom filter for fast set membership queries for type index with one-sided error (false positives). More...
 
class  BucketPQ
 Addressable priority queue for values in the range [0,n) and integer keys (= priorities) in the range [minPrio, maxPrio]. More...
 
struct  FunctionTraits
 
struct  FunctionTraits< R(*)(Args...)>
 
struct  FunctionTraits< R(Args...)>
 
struct  FunctionTraits< R(C::*)(Args...)>
 
struct  FunctionTraits< R(C::*)(Args...) const >
 
struct  FunctionTraits< R(C::*)>
 
struct  FunctionTraits< F & >
 
struct  FunctionTraits< F && >
 
class  PrioQueue
 Priority queue with extract-min and decrease-key. More...
 
class  PrioQueueForInts
 Addressable priority queue for elements in the range [0,n) and integer priorities in the range [0, maxPrio]. More...
 
class  SetIntersector
 Provides set intersection for sets with entries from 0 to an upper bound (exclusive). More...
 
class  SignalHandler
 
class  Timer
 A timer for running time measurements. More...
 

Typedefs

typedef NetworKit::index index
 
typedef NetworKit::count count
 
typedef std::list< indexBucket
 
template<typename T >
using decay_t = typename std::decay< T >::type
 This is a backport of C++14 std::decay_t. More...
 
template<bool B>
using boolToType = std::integral_constant< bool, B >
 Returns the corresponding std::integral_constant<bool, B> to a boolean value B. More...
 

Functions

template<typename Exception = std::runtime_error>
void enforce (bool b, const char *msg="")
 Enforces that b is true and throws an Exception otherwise. More...
 
template<typename Exception = std::runtime_error>
void enforce (bool b, const std::string &msg)
 Overload that accepts a std::string. More...
 
template<typename Stream >
void enforceOpened (const Stream &stream)
 Checks that the provided fstream is opened and throws an exception otherwise. More...
 
void setNumberOfThreads (int nThreads)
 Set the number of threads available to the program. More...
 
int getCurrentNumberOfThreads ()
 
int getMaxNumberOfThreads ()
 
void enableNestedParallelism ()
 Enable OpenMP nested parallelism. More...
 
template<typename... T>
std::string toString (const T &...args)
 
template<typename... T>
std::ostream & printToStream (std::ostream &stream, const T &...args)
 
template<typename... T>
std::string toStringF (const std::string &format, const T &...args)
 
template<typename... T>
std::ostream & printToStreamF (std::ostream &stream, const std::string &format, const T &...args)
 
template<typename T1 , typename T2 >
constexpr bool isSame ()
 This is just a wrapper around std::is_same in order to provide a nicer interface. More...
 
template<typename Base , typename Derived >
constexpr bool isBaseOrSame ()
 Checks whether Derived is either a type that derives from Base or is identical to Base. More...
 

Variables

constexpr int64_t none = std::numeric_limits<int64_t>::max()
 

Typedef Documentation

template<bool B>
using Aux::boolToType = typedef std::integral_constant<bool, B>

Returns the corresponding std::integral_constant<bool, B> to a boolean value B.

typedef std::list< index > Aux::Bucket
template<typename T >
using Aux::decay_t = typedef typename std::decay<T>::type

This is a backport of C++14 std::decay_t.

Function Documentation

void Aux::enableNestedParallelism ( )

Enable OpenMP nested parallelism.

template<typename Exception = std::runtime_error>
void Aux::enforce ( bool  b,
const char *  msg = "" 
)
inline

Enforces that b is true and throws an Exception otherwise.

If provided, msg must not be null, otherwise the behavior of this function is undefined.

template<typename Exception = std::runtime_error>
void Aux::enforce ( bool  b,
const std::string &  msg 
)
inline

Overload that accepts a std::string.

This is mainly for convenience while keeping the default-version free of unneeded allocations.

template<typename Stream >
void Aux::enforceOpened ( const Stream &  stream)
inline

Checks that the provided fstream is opened and throws an exception otherwise.

int Aux::getCurrentNumberOfThreads ( )
Returns
The number of threads currently running.
int Aux::getMaxNumberOfThreads ( )
Returns
The maximum number of threads available to the program.
template<typename Base , typename Derived >
constexpr bool Aux::isBaseOrSame ( )

Checks whether Derived is either a type that derives from Base or is identical to Base.

This is very usefull for situations in which you work with iterator-traits or the like.

template<typename T1 , typename T2 >
constexpr bool Aux::isSame ( )

This is just a wrapper around std::is_same in order to provide a nicer interface.

With C++14 this could use template-variables, but with C++11 we are stuck with constexpr-functions.

template<typename... T>
std::ostream & Aux::printToStream ( std::ostream &  stream,
const T &...  args 
)
template<typename... T>
std::ostream & Aux::printToStreamF ( std::ostream &  stream,
const std::string &  format,
const T &...  args 
)
void Aux::setNumberOfThreads ( int  nThreads)

Set the number of threads available to the program.

template<typename... T>
std::string Aux::toString ( const T &...  args)
template<typename... T>
std::string Aux::toStringF ( const std::string &  format,
const T &...  args 
)

Variable Documentation

constexpr int64_t Aux::none = std::numeric_limits<int64_t>::max()