AFLOW
 
Loading...
Searching...
No Matches
aurostd_xscalar.h File Reference
#include <cmath>
#include <cstddef>
#include <string>
#include <vector>
#include <sys/types.h>
#include "aurostd_defs.h"
#include "aurostd_xcomplex.h"

Go to the source code of this file.

Namespaces

namespace  aurostd
 

Macros

#define _AUROSTD_XSCALAR_DEFAULT_SIZE_   3
 
#define _AUROSTD_XSCALAR_TOLERANCE_IDENTITY_   1.0e-6
 
#define _AUROSTD_XSCALAR_TOLERANCE_ROUNDOFF_   1.0e-6
 
#define _AUROSTD_XSCALAR_TOLERANCE_INTEGER_   1.0e-2
 

Functions

bool aurostd::_ishex (const std::string &) __xprototype
 
template<class utype>
bool aurostd::_isodd (utype x)
 
template<class utype>
bool aurostd::_iseven (utype x)
 
template<class utype>
bool aurostd::_isreal (utype) __xprototype
 
template<class utype>
bool aurostd::_iscomplex (utype) __xprototype
 
template<class utype>
size_t aurostd::_size (utype)
 
template<class utype>
size_t aurostd::_size (xcomplex< utype > x)
 
template<class utype>
utype aurostd::abs (utype) __xprototype
 
template<class utype>
utype aurostd::sqrt (utype x)
 
template<class utype>
utype aurostd::exp (utype x)
 
template<class utype>
utype aurostd::sign (utype x)
 
template<class utype>
utype aurostd::mod (utype x, utype y)
 
template<class utype>
utype aurostd::mod_floored (utype x, utype y)
 floored mod function e.g. std::fmod(-4.0,+1.1)= -0.7; std::fmod(-4.0,-1.1)= -0.7 std::remainder(-4.0,+1.1)= +0.4; std::remainder(-4.0,-1.1)= +0.4 aurostd::mod_floored(-4.0,+1.1)= +0.4; aurostd::mod_floored(-4.0,-1.1)= -0.7
 
template<class utype>
utype aurostd::nint (utype x)
 
template<class utype>
void aurostd::_GCD (int a, int b, int &gcd, int &x, int &y)
 
template<class utype>
void aurostd::_GCD (int a, int b, int &gcd)
 
void aurostd::GCD (int a, int b, int &gcd, int &x, int &y)
 
void aurostd::GCD (int a, int b, int &gcd)
 
void aurostd::GCD (uint a, uint b, uint &gcd, uint &x, uint &y)
 
void aurostd::GCD (uint a, uint b, uint &gcd)
 
void aurostd::GCD (long int a, long int b, long int &gcd, long int &x, long int &y)
 
void aurostd::GCD (long int a, long int b, long int &gcd)
 
void aurostd::GCD (unsigned long int a, unsigned long int b, unsigned long int &gcd, unsigned long int &x, unsigned long int &y)
 
void aurostd::GCD (unsigned long int a, unsigned long int b, unsigned long int &gcd)
 
void aurostd::GCD (long long int a, long long int b, long long int &gcd, long long int &x, long long int &y)
 
void aurostd::GCD (long long int a, long long int b, long long int &gcd)
 
void aurostd::GCD (unsigned long long int a, unsigned long long int b, unsigned long long int &gcd, unsigned long long int &x, unsigned long long int &y)
 
void aurostd::GCD (unsigned long long int a, unsigned long long int b, unsigned long long int &gcd)
 
void aurostd::GCD (float a, float b, float &gcd, float &x, float &y, float tolerance)
 
void aurostd::GCD (float a, float b, float &gcd, float tolerance)
 
void aurostd::GCD (double a, double b, double &gcd, double &x, double &y, double tolerance)
 
void aurostd::GCD (double a, double b, double &gcd, double tolerance)
 
void aurostd::GCD (long double a, long double b, long double &gcd, long double &x, long double &y, long double tolerance)
 
void aurostd::GCD (long double a, long double b, long double &gcd, long double tolerance)
 
int aurostd::LCM (int a, int b)
 
template<class utype>
bool aurostd::isinteger (utype x)
 
template<class atype, class btype>
bool aurostd::isinteger (atype x, btype tolerance)
 
template<class utype>
bool aurostd::iszero (utype a)
 
template<class atype, class btype>
bool aurostd::iszero (atype a, btype tol)
 
string aurostd::dbl2frac (double a, bool sign_prefix)
 
double aurostd::frac2dbl (const std::string &str)
 
void aurostd::double2fraction (const double &input_double, int &numerator, int &denominator, double tol_diff, double tol_remainder)
 
int aurostd::getNumeratorContinuedFractions (int &p, const int &n, std::vector< int > &fraction_sequence)
 
int aurostd::getDenominatorContinuedFractions (int &q, const int &n, std::vector< int > &fraction_sequence)
 
template<class utype>
utype aurostd::fact (utype x)
 
template<class utype>
utype aurostd::factorial (utype x)
 
template<class utype>
utype aurostd::angle (utype x1, utype x2, utype x3, utype y1, utype y2, utype y3)
 
template<class utype>
utype aurostd::angle (utype x1, utype x2, utype y1, utype y2)
 
template<class utype>
utype aurostd::modulus (utype x1, utype x2, utype x3)
 
template<class utype>
utype aurostd::modulus (utype x1, utype x2)
 
double aurostd::ln (double x)
 
float aurostd::lnf (float)
 
float aurostd::ln (float)
 
double aurostd::log (double x)
 
float aurostd::logf (float)
 
float aurostd::log (float)
 
double aurostd::log10 (double x)
 
float aurostd::log10f (float)
 
float aurostd::log10 (float)
 
bool aurostd::_isfloat (bool)
 
bool aurostd::_isfloat (char)
 
bool aurostd::_isfloat (uint)
 
bool aurostd::_isfloat (int)
 
bool aurostd::_isfloat (long int)
 
bool aurostd::_isfloat (unsigned long int)
 
bool aurostd::_isfloat (long long int)
 
bool aurostd::_isfloat (unsigned long long int)
 
bool aurostd::_isfloat (float)
 
bool aurostd::_isfloat (double)
 
bool aurostd::_isfloat (long double)
 
bool aurostd::_isfloat (xcomplex< float >)
 
bool aurostd::_isfloat (xcomplex< double >)
 
bool aurostd::_isfloat (xcomplex< long double >)
 
bool aurostd::isfloat (const std::string &in)
 
bool aurostd::_iscomplex (bool)
 
bool aurostd::_iscomplex (char)
 
bool aurostd::_iscomplex (uint)
 
bool aurostd::_iscomplex (int)
 
bool aurostd::_iscomplex (long int)
 
bool aurostd::_iscomplex (unsigned long int)
 
bool aurostd::_iscomplex (long long int)
 
bool aurostd::_iscomplex (unsigned long long int)
 
bool aurostd::_iscomplex (float)
 
bool aurostd::_iscomplex (double)
 
bool aurostd::_iscomplex (long double)
 
bool aurostd::_iscomplex (xcomplex< float >)
 
bool aurostd::_iscomplex (xcomplex< double >)
 
bool aurostd::_iscomplex (xcomplex< long double >)
 
bool aurostd::_isreal (bool)
 
bool aurostd::_isreal (char)
 
bool aurostd::_isreal (uint)
 
bool aurostd::_isreal (int)
 
bool aurostd::_isreal (long int)
 
bool aurostd::_isreal (unsigned long int)
 
bool aurostd::_isreal (long long int)
 
bool aurostd::_isreal (unsigned long long int)
 
bool aurostd::_isreal (float)
 
bool aurostd::_isreal (double)
 
bool aurostd::_isreal (long double)
 
bool aurostd::_isreal (xcomplex< float >)
 
bool aurostd::_isreal (xcomplex< double >)
 
bool aurostd::_isreal (xcomplex< long double >)
 
bool aurostd::_iseven (bool) __xprototype
 
bool aurostd::_iseven (char) __xprototype
 
bool aurostd::_iseven (int x)
 
bool aurostd::_iseven (uint x)
 
bool aurostd::_iseven (float) __xprototype
 
bool aurostd::_iseven (double) __xprototype
 
bool aurostd::_iseven (long int x)
 
bool aurostd::_iseven (long long int x)
 
bool aurostd::_iseven (unsigned long long int x)
 
bool aurostd::_iseven (long double) __xprototype
 
bool aurostd::_iseven (xcomplex< float >) __xprototype
 
bool aurostd::_iseven (xcomplex< double >) __xprototype
 
bool aurostd::_iseven (xcomplex< long double >) __xprototype
 
bool aurostd::_isodd (bool) __xprototype
 
bool aurostd::_isodd (char) __xprototype
 
bool aurostd::_isodd (int x)
 
bool aurostd::_isodd (uint x)
 
bool aurostd::_isodd (float) __xprototype
 
bool aurostd::_isodd (double) __xprototype
 
bool aurostd::_isodd (long int x)
 
bool aurostd::_isodd (long long int x)
 
bool aurostd::_isodd (unsigned long long int x)
 
bool aurostd::_isodd (long double) __xprototype
 
bool aurostd::_isodd (xcomplex< float >) __xprototype
 
bool aurostd::_isodd (xcomplex< double >) __xprototype
 
bool aurostd::_isodd (xcomplex< long double >) __xprototype
 
bool aurostd::_real (bool x)
 
char aurostd::_real (char x)
 
uint aurostd::_real (uint x)
 
int aurostd::_real (int x)
 
long int aurostd::_real (long int x)
 
unsigned long int aurostd::_real (unsigned long int x)
 
long long int aurostd::_real (long long int x)
 
unsigned long long int aurostd::_real (unsigned long long int x)
 
float aurostd::_real (float x)
 
double aurostd::_real (double x)
 
long double aurostd::_real (long double x)
 
float aurostd::_real (xcomplex< float > x)
 
double aurostd::_real (xcomplex< double > x)
 
long double aurostd::_real (xcomplex< long double > x)
 
bool aurostd::signnozero (bool) __xprototype
 
char aurostd::signnozero (char x)
 
int aurostd::signnozero (int x)
 
uint aurostd::signnozero (uint) __xprototype
 
float aurostd::signnozero (float x)
 
double aurostd::signnozero (double x)
 
long int aurostd::signnozero (long int x)
 
long long int aurostd::signnozero (long long int x)
 
long double aurostd::signnozero (long double x)
 
xcomplex< float > aurostd::signnozero (xcomplex< float >) __xprototype
 
xcomplex< double > aurostd::signnozero (xcomplex< double >) __xprototype
 
xcomplex< long double > aurostd::signnozero (xcomplex< long double >) __xprototype
 
bool aurostd::nint (bool) __xprototype
 
char aurostd::nint (char x)
 
int aurostd::nint (int x)
 
uint aurostd::nint (uint x)
 
float aurostd::nint (float x)
 
double aurostd::nint (double x)
 
long int aurostd::nint (long int x)
 
long long int aurostd::nint (long long int x)
 
long long unsigned int aurostd::nint (long long unsigned int x)
 
long double aurostd::nint (long double x)
 
xcomplex< float > aurostd::nint (xcomplex< float >) __xprototype
 
xcomplex< double > aurostd::nint (xcomplex< double >) __xprototype
 
xcomplex< long double > aurostd::nint (xcomplex< long double >) __xprototype
 
char aurostd::abs (char x)
 
int aurostd::abs (int x)
 
uint aurostd::abs (uint x)
 
float aurostd::abs (float x)
 
double aurostd::abs (double x)
 
long int aurostd::abs (long int x)
 
long long int aurostd::abs (long long int x)
 
unsigned long int aurostd::abs (unsigned long int x)
 
unsigned long long int aurostd::abs (unsigned long long int x)
 
long double aurostd::abs (long double x)
 
float aurostd::abs (xcomplex< float > x)
 
double aurostd::abs (xcomplex< double > x)
 
long double aurostd::abs (xcomplex< long double > x)
 
template<class utype>
utype aurostd::pow (utype x, utype d)
 
double aurostd::round (double x, uint digits)
 rounds a real number to arbitrary digits
 
int aurostd::roundDouble (double doub, int multiple, bool up)
 
bool aurostd::greaterEqualZero (double val)
 
bool aurostd::lessEqualZero (double val)
 
bool aurostd::notPositive (double val, bool soft_cutoff, double tol)
 
bool aurostd::notNegative (double val, bool soft_cutoff, double tol)
 
bool aurostd::zeroWithinTol (double val, double tol)
 
bool aurostd::nonZeroWithinTol (double val, double tol)
 
template<class utype>
bool aurostd::identical (const utype &a, const utype &b, const utype &_tol_)
 
template<class utype>
bool aurostd::identical (const utype &a, const utype &b)
 
bool aurostd::identical (const bool a, const bool b)
 
bool aurostd::identical (const char a, const char b)
 
bool aurostd::identical (const std::string &a, const std::string &b)
 
template<class utype>
bool aurostd::isdifferent (const utype &a, const utype &b, const utype &_tol_)
 
template<class utype>
bool aurostd::isdifferent (const utype &a, const utype &b)
 
bool aurostd::isdifferent (const bool a, const bool b)
 
bool aurostd::isdifferent (const char a, const char b)
 
bool aurostd::isdifferent (const std::string &a, const std::string &b)
 
template<class utype>
bool aurostd::isequal (const utype &a, const utype &b, const utype &_tol_)
 
template<class utype>
bool aurostd::isequal (const utype &a, const utype &b)
 
bool aurostd::isequal (const bool a, const bool b)
 
bool aurostd::isequal (const char a, const char b)
 
bool aurostd::isequal (const std::string &a, const std::string &b)
 
template<class utype>
utype aurostd::min (utype x1, utype x2)
 
template<class utype>
utype aurostd::min (utype x1, utype x2, utype x3)
 
template<class utype>
utype aurostd::min (utype x1, utype x2, utype x3, utype x4)
 
template<class utype>
utype aurostd::min (utype x1, utype x2, utype x3, utype x4, utype x5)
 
template<class utype>
utype aurostd::min (utype x1, utype x2, utype x3, utype x4, utype x5, utype x6)
 
template<class utype>
utype aurostd::min (utype x1, utype x2, utype x3, utype x4, utype x5, utype x6, utype x7)
 
template<class utype>
utype aurostd::min (utype x1, utype x2, utype x3, utype x4, utype x5, utype x6, utype x7, utype x8)
 
template<class utype>
utype aurostd::min (utype x1, utype x2, utype x3, utype x4, utype x5, utype x6, utype x7, utype x8, utype x9)
 
template<class utype>
utype aurostd::min (utype x1, utype x2, utype x3, utype x4, utype x5, utype x6, utype x7, utype x8, utype x9, utype x10)
 
template<class utype>
utype aurostd::min (utype x1, utype x2, utype x3, utype x4, utype x5, utype x6, utype x7, utype x8, utype x9, utype x10, utype x11)
 
template<class utype>
utype aurostd::min (utype x1, utype x2, utype x3, utype x4, utype x5, utype x6, utype x7, utype x8, utype x9, utype x10, utype x11, utype x12)
 
template<class utype>
utype aurostd::max (utype x1, utype x2)
 
template<class utype>
utype aurostd::max (utype x1, utype x2, utype x3)
 
template<class utype>
utype aurostd::max (utype x1, utype x2, utype x3, utype x4)
 
template<class utype>
utype aurostd::max (utype x1, utype x2, utype x3, utype x4, utype x5)
 
template<class utype>
utype aurostd::max (utype x1, utype x2, utype x3, utype x4, utype x5, utype x6)
 
template<class utype>
utype aurostd::max (utype x1, utype x2, utype x3, utype x4, utype x5, utype x6, utype x7)
 
template<class utype>
utype aurostd::max (utype x1, utype x2, utype x3, utype x4, utype x5, utype x6, utype x7, utype x8)
 
template<class utype>
utype aurostd::max (utype x1, utype x2, utype x3, utype x4, utype x5, utype x6, utype x7, utype x8, utype x9)
 
template<class utype>
utype aurostd::max (utype x1, utype x2, utype x3, utype x4, utype x5, utype x6, utype x7, utype x8, utype x9, utype x10)
 
template<class utype>
utype aurostd::max (utype x1, utype x2, utype x3, utype x4, utype x5, utype x6, utype x7, utype x8, utype x9, utype x10, utype x11)
 
template<class utype>
utype aurostd::max (utype x1, utype x2, utype x3, utype x4, utype x5, utype x6, utype x7, utype x8, utype x9, utype x10, utype x11, utype x12)
 
template<class utype>
utype aurostd::_roundoff (const utype &x, utype tolerance)
 
int aurostd::roundoff (int x, int tolerance)
 
long aurostd::roundoff (long x, long tolerance)
 
uint aurostd::roundoff (uint x, uint tolerance)
 
float aurostd::roundoff (float x, float tolerance)
 
double aurostd::roundoff (double x, double tolerance)
 
long long int aurostd::roundoff (long long int x, long long int tolerance)
 
unsigned long int aurostd::roundoff (unsigned long int x, unsigned long int tolerance)
 
unsigned long long int aurostd::roundoff (unsigned long long int x, unsigned long long int tolerance)
 
long double aurostd::roundoff (long double x, long double tolerance)
 
int aurostd::boundary_conditions_periodic (int lrows, int urows, int i)
 
uint aurostd::powint (uint x, uint exp)
 
int aurostd::powint (int x, uint exp)
 
long int aurostd::powint (long int x, uint exp)
 
unsigned long int aurostd::powint (unsigned long int x, uint exp)
 
long long int aurostd::powint (long long int x, uint exp)
 
unsigned long long int aurostd::powint (unsigned long long int x, uint exp)
 
double aurostd::FermiDirac (double E, double mu, double T)
 
template<class utype>
utype aurostd::nCk (utype n, utype k)
 
bool aurostd::isNaN (double d)
 

Macro Definition Documentation

◆ _AUROSTD_XSCALAR_DEFAULT_SIZE_

#define _AUROSTD_XSCALAR_DEFAULT_SIZE_   3

Definition at line 21 of file aurostd_xscalar.h.

◆ _AUROSTD_XSCALAR_TOLERANCE_IDENTITY_

#define _AUROSTD_XSCALAR_TOLERANCE_IDENTITY_   1.0e-6

Definition at line 22 of file aurostd_xscalar.h.

◆ _AUROSTD_XSCALAR_TOLERANCE_ROUNDOFF_

#define _AUROSTD_XSCALAR_TOLERANCE_ROUNDOFF_   1.0e-6

Definition at line 23 of file aurostd_xscalar.h.

◆ _AUROSTD_XSCALAR_TOLERANCE_INTEGER_

#define _AUROSTD_XSCALAR_TOLERANCE_INTEGER_   1.0e-2

Definition at line 25 of file aurostd_xscalar.h.