Skip to content

Commit

Permalink
[filter] remove duplicated unecessary unused value type template (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
FrancoisCarouge authored Jul 24, 2022
1 parent cdcbec9 commit c0fdb0e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ class kalman

| Template Parameter | Definition |
| --- | --- |
| `Type` | The type template parameter of the value type of the filter. |
| `State` | The type template parameter of the state vector x. State variables can be observed (measured), or hidden variables (inferred). This is the the mean of the multivariate Gaussian. |
| `Output` | The type template parameter of the measurement vector z. |
| `Input` | The type template parameter of the control u. |
Expand Down
2 changes: 1 addition & 1 deletion include/fcarouge/internal/eigen.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ template <typename Type = double, std::size_t State = 1, std::size_t Output = 1,
typename UpdateTypes = fcarouge::internal::empty_pack_t,
typename PredictionTypes = fcarouge::internal::empty_pack_t>
using kalman = fcarouge::kalman<
Type, std::conditional_t<State == 1, Type, Eigen::Vector<Type, State>>,
std::conditional_t<State == 1, Type, Eigen::Vector<Type, State>>,
std::conditional_t<Output == 1, Type, Eigen::Vector<Type, Output>>,
std::conditional_t<Input == 0 || Input == 1, Type,
Eigen::Vector<Type, Input>>,
Expand Down
11 changes: 3 additions & 8 deletions include/fcarouge/kalman.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ struct identity_matrix {
//! the measurement (Z, R), the measurement function H, and if the system has
//! control inputs (U, B). Designing a filter is as much art as science.
//!
//! @tparam Type The type template parameter of the value type of the filter.
//! @tparam State The type template parameter of the state vector X. State
//! variables can be observed (measured), or hidden variables (inferred). This
//! is the the mean of the multivariate Gaussian.
Expand Down Expand Up @@ -151,10 +150,9 @@ struct identity_matrix {
//! re-initializations but to what default?
//! @todo Could the Input be void by default? Or empty?
template <
typename Type = double, typename State = Type, typename Output = State,
typename Input = State, typename Transpose = std::identity,
typename Symmetrize = std::identity, typename Divide = std::divides<void>,
typename Identity = identity_matrix,
typename State = double, typename Output = State, typename Input = State,
typename Transpose = std::identity, typename Symmetrize = std::identity,
typename Divide = std::divides<void>, typename Identity = identity_matrix,
typename UpdateTypes = internal::empty_pack_t,
typename PredictionTypes = internal::empty_pack_t>
class kalman
Expand All @@ -178,9 +176,6 @@ class kalman
//! @name Public Member Types
//! @{

//! @brief The type of the filtered data elements.
using value_type = Type;

//! @brief Type of the state estimate vector X.
using state = typename implementation::state;

Expand Down

0 comments on commit c0fdb0e

Please sign in to comment.