/** This file is a part of our_dick Copyright (C) 2020 rexy712 This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ #ifndef REXY_DETAIL_MATRIX_HPP #define REXY_DETAIL_MATRIX_HPP #include //size_t #include //integer_sequence namespace math::detail{ template struct gen_id_tup { using tup = typename gen_id_tup::tup; }; template struct gen_id_tup { using tup = typename gen_id_tup::tup; }; template struct gen_id_tup { using tup = typename gen_id_tup::tup; }; template struct gen_id_tup { using tup = std::integer_sequence; }; template struct gen_zero_tup { using tup = typename gen_zero_tup::tup; }; template struct gen_zero_tup<0,Args...> { using tup = std::integer_sequence; }; template struct id_initialization_matrix { using tuple = typename gen_id_tup::tup; }; template struct default_initialization_matrix { using tuple = typename gen_zero_tup::tup; }; template struct default_initialization_matrix { using tuple = typename id_initialization_matrix::tuple; }; template class mat_ref_obj { public: using size_type = size_t; protected: T* m_data = nullptr; public: constexpr mat_ref_obj(T* d, size_type i); constexpr T& operator[](size_type i); constexpr const T& operator[](size_type i)const; }; template struct determinate_helper { static constexpr T perform(const matrix& m); }; template struct determinate_helper { static constexpr T perform(const matrix& m); }; template struct determinate_helper { static constexpr T perform(const matrix& m); }; template struct inverse_helper { //TODO generalized inverse }; template struct inverse_helper { static constexpr matrix perform(const matrix& m); }; template struct inverse_helper { static constexpr matrix perform(const matrix& m); }; template struct inverse_helper { static constexpr matrix perform(const matrix& m); }; } #include "matrix.tpp" #endif