1 #ifndef CASM_GLOBAL_DEFINTIONS_HH
2 #define CASM_GLOBAL_DEFINTIONS_HH
13 #include "casm/external/Eigen/Dense"
18 namespace fs = boost::filesystem;
19 namespace po = boost::program_options;
24 typedef unsigned long int ulint;
31 const double TOL = 0.00001;
34 const double KB = 8.6173423E-05;
37 const double PLANCK = 4.135667516E-15;
40 std::istream &
operator>>(std::istream &_in, std::vector<T> &vec) {
42 std::getline(_in, line,
'\n');
43 std::stringstream tss(line);
76 template<
typename Object,
typename Transform,
typename...Args>
77 Object &
apply(
const Transform &f, Object &obj,
Args &&...args) {
78 return obj.apply_sym(f, std::forward<Args>(args)...);
83 template<
typename Object,
typename Transform,
typename...Args>
85 return apply(f, obj, std::forward<Args>(args)...);
94 typedef Matrix<long int, Dynamic, Dynamic>
MatrixXl;
97 template<
typename Derived>
98 std::istream &
operator >> (std::istream &s, MatrixBase<Derived> &m) {
99 for(
int i = 0; i < m.rows(); ++i)
100 for(
int j = 0; j < m.cols(); j++)
109 ostream &operator<<(ostream &out, const vector<T> &vec) {
112 for(
auto it = vec.cbegin(); it != vec.cend(); ++it) {
Matrix< long int, 3, 1 > Vector3l
Object copy_apply(const Transform &f, Object obj, Args &&...args)
Matrix< long int, Dynamic, Dynamic > MatrixXl
std::istream & operator>>(std::istream &s, MatrixBase< Derived > &m)
void swap(ConfigDoF &A, ConfigDoF &B)
Eigen::MatrixXd::Index EigenIndex
For integer indexing:
EigenIndex Index
For long integer indexing:
Matrix< long int, Dynamic, 1 > VectorXl
void print_splash(std::ostream &out)
std::istream & operator>>(std::istream &_in, std::vector< T > &vec)
Matrix< long int, 3, 3 > Matrix3l
Object & apply(const Transform &f, Object &obj, Args &&...args)
bool valid_index(Index i)