CASM
AClustersApproachtoStatisticalMechanics
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules
ContainerTraits.hh
Go to the documentation of this file.
1 #ifndef CASM_ContainerTraits_HH
2 #define CASM_ContainerTraits_HH
3 
4 #include "casm/external/Eigen/Dense"
5 #include "casm/misc/CASM_TMP.hh"
6 
7 namespace CASM {
8 
9 
18  template<typename _Container>
19  struct ContainerTraits {};
20 
22  template<>
26  typedef Eigen::VectorXd::Scalar value_type;
28 
30  static size_type size(const Eigen::VectorXd &vec) {
31  return vec.size();
32  }
33  };
34 
35 }
36 
37 #endif
Specialize container traits Expects:
CASM_TMP::ParenthesesAccess< Container, value_type, size_type > Access
Main CASM namespace.
Definition: complete.cpp:8
Helper Functor for Counter container access using operator()
Definition: CASM_TMP.hh:180
EigenIndex Index
For long integer indexing:
Eigen::VectorXd VectorXd
static size_type size(const Eigen::VectorXd &vec)
Return size of container.