add double precision alias declarations and remove typedefs

This commit is contained in:
Daniel Agar
2021-02-11 12:40:54 -05:00
parent 977cf52322
commit 3679f7fd51
9 changed files with 30 additions and 18 deletions
+3 -2
View File
@@ -30,7 +30,7 @@ template<typename Type>
class AxisAngle : public Vector<Type, 3>
{
public:
typedef Matrix<Type, 3, 1> Matrix31;
using Matrix31 = Matrix<Type, 3, 1>;
/**
* Constructor from array
@@ -152,7 +152,8 @@ public:
}
};
typedef AxisAngle<float> AxisAnglef;
using AxisAnglef = AxisAngle<float>;
using AxisAngled = AxisAngle<double>;
} // namespace matrix
+3 -2
View File
@@ -39,7 +39,7 @@ template<typename Type>
class Dcm : public SquareMatrix<Type, 3>
{
public:
typedef Matrix<Type, 3, 1> Vector3;
using Vector3 = Matrix<Type, 3, 1>;
/**
* Standard constructor
@@ -182,7 +182,8 @@ public:
}
};
typedef Dcm<float> Dcmf;
using Dcmf = Dcm<float>;
using Dcmd = Dcm<double>;
} // namespace matrix
+2 -1
View File
@@ -153,7 +153,8 @@ public:
};
typedef Euler<float> Eulerf;
using Eulerf = Euler<float>;
using Eulerd = Euler<double>;
} // namespace matrix
+7 -4
View File
@@ -53,8 +53,8 @@ template<typename Type>
class Quaternion : public Vector<Type, 4>
{
public:
typedef Matrix<Type, 4, 1> Matrix41;
typedef Matrix<Type, 3, 1> Matrix31;
using Matrix41 = Matrix<Type, 4, 1>;
using Matrix31 = Matrix<Type, 3, 1>;
/**
* Constructor from array
@@ -449,8 +449,11 @@ public:
}
};
typedef Quaternion<float> Quatf;
typedef Quaternion<float> Quaternionf;
using Quatf = Quaternion<float>;
using Quaternionf = Quaternion<float>;
using Quatd = Quaternion<double>;
using Quaterniond = Quaternion<double>;
} // namespace matrix
+2 -1
View File
@@ -50,7 +50,8 @@ private:
};
typedef Scalar<float> Scalarf;
using Scalarf = Scalar<float>;
using Scalard = Scalar<double>;
} // namespace matrix
+4 -2
View File
@@ -266,7 +266,8 @@ public:
};
typedef SquareMatrix<float, 3> SquareMatrix3f;
using SquareMatrix3f = SquareMatrix<float, 3>;
using SquareMatrix3d = SquareMatrix<double, 3>;
template<typename Type, size_t M>
SquareMatrix<Type, M> eye() {
@@ -535,7 +536,8 @@ SquareMatrix <Type, M> choleskyInv(const SquareMatrix<Type, M> & A)
return L_inv.T()*L_inv;
}
typedef SquareMatrix<float, 3> Matrix3f;
using Matrix3f = SquareMatrix<float, 3>;
using Matrix3d = SquareMatrix<double, 3>;
} // namespace matrix
+1 -1
View File
@@ -20,7 +20,7 @@ template<typename Type, size_t M>
class Vector : public Matrix<Type, M, 1>
{
public:
typedef Matrix<Type, M, 1> MatrixM1;
using MatrixM1 = Matrix<Type, M, 1>;
Vector() = default;
+5 -3
View File
@@ -21,8 +21,8 @@ class Vector2 : public Vector<Type, 2>
{
public:
typedef Matrix<Type, 2, 1> Matrix21;
typedef Vector<Type, 3> Vector3;
using Matrix21 = Matrix<Type, 2, 1>;
using Vector3 = Vector<Type, 3>;
Vector2() = default;
@@ -71,7 +71,9 @@ public:
};
typedef Vector2<float> Vector2f;
using Vector2f = Vector2<float>;
using Vector2d = Vector2<double>;
} // namespace matrix
+3 -2
View File
@@ -30,7 +30,7 @@ class Vector3 : public Vector<Type, 3>
{
public:
typedef Matrix<Type, 3, 1> Matrix31;
using Matrix31 = Matrix<Type, 3, 1>;
Vector3() = default;
@@ -148,7 +148,8 @@ public:
};
typedef Vector3<float> Vector3f;
using Vector3f = Vector3<float>;
using Vector3d = Vector3<double>;
} // namespace matrix