• Class / Function / Type

      std::
    • Header file

      <>
    • Other / All

    最終更新日時(UTC):
    が更新

    履歴 編集

    function template
    <linalg>

    std::linalg::possibly-multipliable

    namespace std::linalg {
      template<in-matrix InMat, in-vector InVec, in-vector OutVec>
      constexpr bool possibly-multipliable()
      {
        return compatible-static-extents<OutVec, InMat>(0, 0) &&
               compatible-static-extents<InMat, InVec>(1, 0);
      } // (1)
    
      template<in-vector InVec, in-matrix InMat, in-vector OutVec>
      constexpr bool possibly-multipliable()
      {
        return compatible-static-extents<OutVec, InMat>(0, 1) &&
               compatible-static-extents<InMat, InVec>(0, 0);
      } // (2)
    
      template<in-matrix InMat1, in-matrix InMat2, in-matrix OutMat>
      constexpr bool possibly-multipliable()
      {
        return compatible-static-extents<OutMat, InMat1>(0, 0) &&
               compatible-static-extents<OutMat, InMat2>(1, 1) &&
               compatible-static-extents<InMat1, InMat2>(1, 0);
      } // (3)
    }
    

    概要

    テンプレートパラメータに指定されたベクトルや行列が掛けられるかを静的要素数で判定する、説明専用の関数である。

    戻り値

    InMat型の変数をA, InVec型の変数をx, OutVec型の変数をyとする。

    • (1): yAx が可能ならtrue、そうでないならfalse
    • (2): ytxtA が可能ならtrue、そうでないならfalse
    • (3): InMat1型の変数をA, InMat2型の変数をB, OutMat型の変数Cとすると、CAB が可能ならtrue、そうでないならfalse

    バージョン

    言語

    • C++26

    関連項目

    参照