C++ main module for stochmagnet Package  1.0
Classes | Namespaces | Macros | Functions | Variables
functions.h File Reference
#include "types.h"
#include <stdlib.h>
#include <cxxabi.h>
#include <type_traits>
#include <regex>
#include <concepts>
#include <math.h>
Include dependency graph for functions.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  core_functions::is_complex< T >
 
struct  core_functions::is_complex< std::complex< T > >
 

Namespaces

 core_functions
 

Macros

#define iand(a, b)   ( (a) & (b) )
 
#define ior(a, b)   ( (a) | (b) )
 
#define inor(a, b)   ( ~( (a) | (b) ) )
 
#define ixor(a, b)   ( (a) ^ (b) ) )
 
#define inot(a)   ( 256 - (~(a)) )
 
#define ASSERT(a)   {}
 
#define ASSERT_IN(a)   {}
 
#define ASSERT_OUT(a)   {}
 
#define ASSERT_EXCEPTION(T, P, F, C)
 

Functions

template<class T >
tString core_functions::pointerToString (const T *ptr)
 return the pointer of the class as a string More...
 
template<typename T >
tBoolean core_functions::areEquals (const T &e1, const T &e2)
 tests if two elements are equals More...
 
template<>
tBoolean core_functions::areEquals (const tReal &e1, const tReal &e2)
 tests if two string are equals More...
 
template<>
tBoolean core_functions::areEquals (const tComplex &e1, const tComplex &e2)
 tests if two string are equals More...
 
template<>
tBoolean core_functions::areEquals (const tString &e1, const tString &e2)
 tests if two string are equals More...
 
template<typename T , std::enable_if_t< std::is_integral_v< T >> * = nullptr>
tString core_functions::toString (const T &v, const tUCInt &d)
 
template<typename T , std::enable_if_t< std::is_arithmetic_v< T >> * = nullptr>
tString core_functions::toString (const T &v)
 
tString core_functions::booleanToString (const tBoolean &v)
 
tStringcore_functions::ltrim (tString &s)
 remove all the empty characters at the beginning of the string More...
 
tStringcore_functions::rtrim (tString &s)
 remove all the empty characters at the end of the string More...
 
tStringcore_functions::trim (tString &s)
 remove all the empty characters at the begining and end of the string More...
 
void core_functions::replaceAll (const tString &word, const tString &rWord, tString &str)
 replace all instnce of word by replace word in string More...
 
void core_functions::toLower (tString &s)
 turn a string to lower value More...
 
void core_functions::toUpper (tString &s)
 turn a string to lower value More...
 
void core_functions::tokenize (tString &str, const tString &delim, std::vector< tString > words)
 tokenize More...
 
template<typename T >
requires core_functions::isArithmeticType< T > const T & core_functions::min (const T &a, const T &b)
 min function More...
 
template<typename T >
requires core_functions::isArithmeticType< T > const T & core_functions::max (const T &a, const T &b)
 max function More...
 
template<typename T >
requires core_functions::isRealType< T > tBoolean core_functions::isNAN (const T &s)
 return true if the argument is an integer number More...
 
tBoolean core_functions::isInteger (const tString &s)
 return true if the argument is an integer number More...
 
tBoolean core_functions::isNumeric (const tString &s)
 return true if the argument is an integer number More...
 
tBoolean core_functions::isString (const tString &s)
 return true if the argument is a string More...
 
template<typename T >
void core_functions::parse (const tString &s, T &v)
 parse the string More...
 
template<>
void core_functions::parse (const tString &s, tBoolean &v)
 parse the string More...
 
template<typename T , size_t D>
tString core_functions::toString (const std::array< T, D > &a)
 rretru the array to string More...
 
template<typename T >
tString core_functions::toString (const std::valarray< T > &a)
 rretru the array to string More...
 
template<typename Q >
const std::pair< Q, Q > & core_functions::complexMultiply (const std::pair< Q, Q > &alpha, std::pair< Q, Q > &beta)
 
template<typename Q >
const std::pair< Q, Q > & core_functions::complexAdd (const std::pair< Q, Q > &alpha, std::pair< Q, Q > &beta)
 

Variables

template<typename T >
concept core_functions::isComplexType
 
template<typename T >
concept core_functions::isArithmeticType
 
template<typename T >
concept core_functions::isOrderedType
 
template<typename T >
concept core_functions::isStringType
 
template<typename T >
concept core_functions::isRealType
 
template<typename T >
concept core_functions::isIntegerType
 
template<typename T >
concept core_functions::isSignedIntegerType
 
template<typename T >
concept core_functions::isUnsignedIntegerType
 
template<class Base , class Derived >
concept core_functions::isBaseOf = std::is_base_of_v<Base, Derived>
 
template<class T >
concept core_functions::isArray = std::is_array<T>()
 
template<class T >
concept core_functions::isBoundedArray = std::is_bounded_array<T>::value
 
template<class T >
concept core_functions::isUnboundedArray = std::is_unbounded_array<T>::value
 
template<class T >
concept core_functions::isDoubleArray = std::is_pointer_v<T**>
 
template<class T >
concept core_functions::isPointer = std::is_pointer_v<T>
 
template<class T >
concept core_functions::iNotNullPointer = not std::is_pointer<std::nullptr_t>::value
 
template<class T , class Q >
concept core_functions::isSameType = std::is_same<T,Q>::value
 

Macro Definition Documentation

◆ ASSERT

#define ASSERT (   a)    {}

◆ ASSERT_EXCEPTION

#define ASSERT_EXCEPTION (   T,
  P,
  F,
 
)

◆ ASSERT_IN

#define ASSERT_IN (   a)    {}

◆ ASSERT_OUT

#define ASSERT_OUT (   a)    {}

◆ iand

#define iand (   a,
 
)    ( (a) & (b) )

◆ inor

#define inor (   a,
 
)    ( ~( (a) | (b) ) )

◆ inot

#define inot (   a)    ( 256 - (~(a)) )

◆ ior

#define ior (   a,
 
)    ( (a) | (b) )

◆ ixor

#define ixor (   a,
 
)    ( (a) ^ (b) ) )