Skip to content

Commit

Permalink
[cpp] remove more optional typename
Browse files Browse the repository at this point in the history
  • Loading branch information
FrancoisCarouge committed Oct 9, 2023
1 parent 8b3cee7 commit 59d0cf5
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 18 deletions.
2 changes: 1 addition & 1 deletion include/fcarouge/internal/function.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ struct function_traits<Result (Type::*)(Arguments...) const> {

template <typename Callable>
using function_traits_t =
typename function_traits<decltype(&Callable::operator())>::type;
function_traits<decltype(&Callable::operator())>::type;

template <typename Callable>
function(Callable) -> function<function_traits_t<Callable>>;
Expand Down
5 changes: 2 additions & 3 deletions include/fcarouge/internal/utility.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,15 @@ struct repack<From<Types...>> {
static inline constexpr auto size{sizeof...(Types)};
};

template <typename From> using repack_t = typename repack<From>::type;
template <typename From> using repack_t = repack<From>::type;

template <typename From> inline constexpr auto repack_s{repack<From>::size};

template <typename Type, typename... Types> struct first_type {
using type = Type;
};

template <typename... Types>
using first_t = typename first_type<Types...>::type;
template <typename... Types> using first_t = first_type<Types...>::type;

template <auto Value, auto... Values> struct first_value {
static constexpr auto value{Value};
Expand Down
25 changes: 12 additions & 13 deletions include/fcarouge/kalman.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,55 +186,54 @@ class kalman final {
//! @name Public Member Types
//! @{
//! @brief Type of the state estimate column vector X.
using state = typename implementation::state;
using state = implementation::state;

//! @brief Type of the observation column vector Z.
//!
//! @details Also known as Y or O.
using output = typename implementation::output;
using output = implementation::output;

//! @brief Type of the control column vector U.
//!
//! @todo Conditionally remove this member type when no input is present.
using input = typename implementation::input;
using input = implementation::input;

//! @brief Type of the estimated correlated variance matrix P.
//!
//! @details Also known as Σ.
using estimate_uncertainty = typename implementation::estimate_uncertainty;
using estimate_uncertainty = implementation::estimate_uncertainty;

//! @brief Type of the process noise correlated variance matrix Q.
using process_uncertainty = typename implementation::process_uncertainty;
using process_uncertainty = implementation::process_uncertainty;

//! @brief Type of the observation noise correlated variance matrix R.
using output_uncertainty = typename implementation::output_uncertainty;
using output_uncertainty = implementation::output_uncertainty;

//! @brief Type of the state transition matrix F.
//!
//! @details Also known as the fundamental matrix, propagation, Φ, or A.
using state_transition = typename implementation::state_transition;
using state_transition = implementation::state_transition;

//! @brief Type of the observation transition matrix H.
//!
//! @details Also known as the measurement transition matrix or C.
using output_model = typename implementation::output_model;
using output_model = implementation::output_model;

//! @brief Type of the control transition matrix G.
//!
//! @details Also known as B.
//!
//! @todo Conditionally remove this member type when no input is present.
using input_control = typename implementation::input_control;
using input_control = implementation::input_control;

//! @brief Type of the gain matrix K.
using gain = typename implementation::gain;
using gain = implementation::gain;

//! @brief Type of the innovation column vector Y.
using innovation = typename implementation::innovation;
using innovation = implementation::innovation;

//! @brief Type of the innovation uncertainty matrix S.
using innovation_uncertainty =
typename implementation::innovation_uncertainty;
using innovation_uncertainty = implementation::innovation_uncertainty;
//! @}

//! @name Public Member Functions
Expand Down
2 changes: 1 addition & 1 deletion linalg/lazy/fcarouge/linalg.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ struct matrix {
}

using generator = std::generator<Type>;
using promise_type = typename std::coroutine_traits<generator>::promise_type;
using promise_type = std::coroutine_traits<generator>::promise_type;
// Add other aliases such as iterator or value type?

auto begin() const { return genie.begin(); }
Expand Down

0 comments on commit 59d0cf5

Please sign in to comment.