CASM  1.1.0
A Clusters Approach to Statistical Mechanics
CASM_math.cc File Reference
#include "casm/misc/CASM_math.hh"
#include <map>
#include "casm/global/eigen.hh"

Go to the source code of this file.

Namespaces

 CASM
 Main CASM namespace.
 

Functions

int CASM::round (double val)
 
double CASM::ran0 (int &idum)
 
int CASM::dl_string_dist (const std::string &a, const std::string &b)
 Computes the Damerescau-Levenshtein distance – the number of edits (deletions, insertions, transpositions) to go from string 'a' to string 'b'. More...
 
int CASM::gcf (int i1, int i2)
 Find greatest common factor. More...
 
int CASM::lcm (int i1, int i2)
 Find least common multiple. More...
 
double CASM::gaussian (double a, double x, double b, double c)
 
double CASM::gaussian_moment (int expon, double sigma)
 
double CASM::gaussian_moment (int expon, double sigma, double x0)
 
void CASM::nearest_rational_number (double val, long &numerator, long &denominator, double tol=TOL)
 
std::string CASM::irrational_to_tex_string (double val, int lim, int max_pow=2)
 
std::string CASM::to_sequential_string (Index i, Index max_i, char prepend_char='0')
 
int CASM::mod (int a, int b)
 
double CASM::cuberoot (double number)