Primitives¶
We use a family of base (“primitive”) types.
-
namespace mdk
-
class Types : public Eigen::Matrix<ResType, Eigen::Dynamic, 1>
- #include <Types.hpp>
Data class containing types of residues, in an array form.
-
class Types : public Eigen::Matrix<ResType, Eigen::Dynamic, 1>
-
namespace mdk
Typedefs
-
using Scalars = Eigen::VectorXd
A list of scalars (i.e. doubles).
-
typedef Eigen::Vector3d Vector
A vector (writing
Eigen::Vector3d
everywhere is annoying).
-
typedef Vector const &VRef
Constant reference to a vector. Given the size of a Vector, passing copies wouldn’t be inefficient; it’s here chiefly to hide the warnings.
-
using Bytes = std::vector<int8_t>
List of small integers (usually we use this to store various enums and true/false values).
-
using Integers = std::vector<int>
-
using Scalars = Eigen::VectorXd
-
namespace mdk
Typedefs
-
using VectorBase = Eigen::Matrix<double, 3, Eigen::Dynamic, Eigen::ColMajor>
-
class Vectors : public VectorBase
- #include <Vectors.hpp>
This class is a sort of a decorator over standard Eigen::Matrix3Xd. The chief difference is that this class offers an interface more appropriate for dealing with it as though it were a list of vectors (for example, one needs not use m.col(i) to get t’th vector in the matrix. Also, now size() corresponds to the number of vectors and not the elements of the array. The array itself is not (easily) resizeable.
Public Functions
-
Vectors() = default
-
inline explicit Vectors(int n)
Create an unitialized list of n vectors.
- Parameters
n – Number of vectors
-
inline Vectors(int n, Vector const &init)
Create an initialized list of n vectors.
- Parameters
n – Number of vectors
init – Initial value
-
inline auto vectorwise()
Returns an iterator over constituent vectors.
- Returns
An interator over constituent vectors.
-
inline auto vectorwise() const
Returns a const iterator over constituent vectors.
- Returns
A const interator over constituent vectors.
-
inline int size() const
- Returns
A number of vectors.
-
inline auto operator[](int i)
Access to vector.
- Parameters
i – Index of a vector to access
- Returns
A slice of a matrix corresponding to i’th vector.
-
inline auto operator[](int i) const
Const access to vector.
- Parameters
i – Index of a vector to access
- Returns
A const slice of a matrix corresponding to i’th vector.
-
Vectors() = default
-
using VectorBase = Eigen::Matrix<double, 3, Eigen::Dynamic, Eigen::ColMajor>