AIToolbox
A library that offers tools for AI problem solving.
Types.hpp
Go to the documentation of this file.
1 #ifndef AI_TOOLBOX_TYPES_HEADER_FILE
2 #define AI_TOOLBOX_TYPES_HEADER_FILE
3 
4 #include <vector>
5 #include <random>
6 
7 #include <boost/multi_array.hpp>
8 
9 #include <Eigen/Core>
10 #include <Eigen/SparseCore>
11 
12 namespace AIToolbox {
13  // This should have decent properties.
14  using RandomEngine = std::mt19937;
15 
16  using Vector = Eigen::Matrix<double, Eigen::Dynamic, 1>;
17 
18  using Matrix2D = Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor | Eigen::AutoAlign>;
19  using SparseMatrix2D = Eigen::SparseMatrix<double, Eigen::RowMajor>;
20 
21  using Matrix3D = std::vector<Matrix2D>;
22  using SparseMatrix3D = std::vector<SparseMatrix2D>;
23 
24  using Matrix4D = boost::multi_array<Matrix2D, 2>;
25  using SparseMatrix4D = boost::multi_array<SparseMatrix2D, 2>;
26 
27  using Table2D = Eigen::Matrix<unsigned long, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor | Eigen::AutoAlign>;
28  using Table3D = std::vector<Table2D>;
29 
30  using SparseTable2D = Eigen::SparseMatrix<unsigned long, Eigen::RowMajor>;
31  using SparseTable3D = std::vector<SparseTable2D>;
32 
33  // This is used to store a probability vector (sums to one, every element >= 0, <= 1)
35 
36  using DumbMatrix2D = boost::multi_array<double, 2>;
37  using DumbMatrix3D = boost::multi_array<double, 3>;
38  using DumbTable2D = boost::multi_array<unsigned long, 2>;
39  using DumbTable3D = boost::multi_array<unsigned long, 3>;
40 
44  inline struct NoCheck {} NO_CHECK;
45 }
46 
47 #endif
AIToolbox::SparseTable2D
Eigen::SparseMatrix< unsigned long, Eigen::RowMajor > SparseTable2D
Definition: Types.hpp:30
AIToolbox::NO_CHECK
struct AIToolbox::NoCheck NO_CHECK
AIToolbox::DumbMatrix3D
boost::multi_array< double, 3 > DumbMatrix3D
Definition: Types.hpp:37
AIToolbox::SparseTable3D
std::vector< SparseTable2D > SparseTable3D
Definition: Types.hpp:31
AIToolbox::SparseMatrix3D
std::vector< SparseMatrix2D > SparseMatrix3D
Definition: Types.hpp:22
AIToolbox::Matrix2D
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor|Eigen::AutoAlign > Matrix2D
Definition: Types.hpp:18
AIToolbox::Vector
Eigen::Matrix< double, Eigen::Dynamic, 1 > Vector
Definition: Types.hpp:16
AIToolbox::SparseMatrix4D
boost::multi_array< SparseMatrix2D, 2 > SparseMatrix4D
Definition: Types.hpp:25
AIToolbox::Matrix4D
boost::multi_array< Matrix2D, 2 > Matrix4D
Definition: Types.hpp:24
AIToolbox
Definition: Experience.hpp:6
AIToolbox::RandomEngine
std::mt19937 RandomEngine
Definition: Types.hpp:14
AIToolbox::Matrix3D
std::vector< Matrix2D > Matrix3D
Definition: Types.hpp:21
AIToolbox::DumbTable3D
boost::multi_array< unsigned long, 3 > DumbTable3D
Definition: Types.hpp:39
AIToolbox::DumbMatrix2D
boost::multi_array< double, 2 > DumbMatrix2D
Definition: Types.hpp:36
AIToolbox::ProbabilityVector
Vector ProbabilityVector
Definition: Types.hpp:34
AIToolbox::Table3D
std::vector< Table2D > Table3D
Definition: Types.hpp:28
AIToolbox::NoCheck
This is used to tag functions that avoid runtime checks.
Definition: Types.hpp:44
AIToolbox::Table2D
Eigen::Matrix< unsigned long, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor|Eigen::AutoAlign > Table2D
Definition: Types.hpp:27
AIToolbox::DumbTable2D
boost::multi_array< unsigned long, 2 > DumbTable2D
Definition: Types.hpp:38
AIToolbox::SparseMatrix2D
Eigen::SparseMatrix< double, Eigen::RowMajor > SparseMatrix2D
Definition: Types.hpp:19