We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add IS_COVARIANT, IS_CONTRAVARIANT and dual properties to continuous dimensions. E.g:
IS_COVARIANT
IS_CONTRAVARIANT
dual
class X { /** * @brief A boolean indicating if the dimension is periodic. */ static bool constexpr PERIODIC = false; static bool constexpr IS_COVARIANT = true; static bool constexpr IS_CONTRAVARIANT = true; using Dual = X; }; class R; class R_cov; class R { /** * @brief A boolean indicating if the dimension is periodic. */ static bool constexpr PERIODIC = false; static bool constexpr IS_COVARIANT = false; static bool constexpr IS_CONTRAVARIANT = true; using Dual = R_cov; }; class R_cov { /** * @brief A boolean indicating if the dimension is periodic. */ static bool constexpr PERIODIC = false; static bool constexpr IS_COVARIANT = true; static bool constexpr IS_CONTRAVARIANT = false; using Dual = R; }; template<class Dim, typename = std::enable_if_t<Dim::IS_CONTRAVARIANT>> using to_covariant_t = typename Dim::dual; template<class Dim, typename = std::enable_if_t<Dim::IS_COVARIANT>> using to_contravariant_t = typename Dim::dual;
The text was updated successfully, but these errors were encountered:
@gdgirard Do you agree with these names? Specifically Dual to represent the matching covariant/contravariant type?
Dual
Sorry, something went wrong.
Dual seems fine for me. But maybe R_cov instead of R_co otherwise difficult to remember that _co is for covariant and not for contravariant
R_cov
R_co
_co
Sounds good. I have updated the issue
std::array
Vector
No branches or pull requests
Add
IS_COVARIANT
,IS_CONTRAVARIANT
anddual
properties to continuous dimensions. E.g:The text was updated successfully, but these errors were encountered: