@@ -881,6 +881,20 @@ namespace alp {
881881 >::amf_type type;
882882 };
883883
884+ /* * Specialization for containers that allocate storage */
885+ template < typename Structure, typename ImfC, enum Backend backend, typename Lambda >
886+ struct determine_amf_type < Structure, view::Functor< Lambda >, imf::Id, ImfC, backend > {
887+
888+ static_assert (
889+ std::is_same< ImfC, imf::Id >::value || std::is_same< ImfC, imf::Zero >::value,
890+ " Incompatible combination of parameters provided to determine_amf_type."
891+ );
892+
893+ typedef typename storage::AMFFactory::FromPolynomial<
894+ storage::polynomials::None_type
895+ >::amf_type type;
896+ };
897+
884898 } // namespace internal
885899
886900 /* *
@@ -1117,7 +1131,7 @@ namespace alp {
11171131 > * = nullptr
11181132 >
11191133 Matrix ( std::function< bool () > initialized, const size_t rows, const size_t cols, typename ViewType::applied_to lambda ) :
1120- internal::FunctorBasedMatrix< T, ImfR, ImfC, typename View::applied_to >( initialized, rows, cols, lambda ) {}
1134+ internal::FunctorBasedMatrix< T, ImfR, ImfC, typename View::applied_to >( initialized, imf::Id( rows ), imf::Id( cols ) , lambda ) {}
11211135
11221136 /* *
11231137 * Constructor for a view over another functor-based matrix.
@@ -1321,8 +1335,8 @@ namespace alp {
13211335 internal::requires_allocation< ViewType >::value
13221336 > * = nullptr
13231337 >
1324- Matrix ( bool initialized, const size_t dim, typename ViewType::applied_to lambda ) :
1325- internal::FunctorBasedMatrix< T, ImfR, ImfC, typename View::applied_to >( initialized, dim, dim, lambda ) {}
1338+ Matrix ( std::function< bool () > initialized, const size_t dim, typename ViewType::applied_to lambda ) :
1339+ internal::FunctorBasedMatrix< T, ImfR, ImfC, typename View::applied_to >( initialized, imf::Id( dim ), imf::Id( dim ) , lambda ) {}
13261340
13271341 /* *
13281342 * Constructor for a view over another functor-based matrix.
@@ -1499,7 +1513,7 @@ namespace alp {
14991513 > * = nullptr
15001514 >
15011515 Matrix ( std::function< bool () > initialized, const size_t dim, typename ViewType::applied_to lambda ) :
1502- internal::FunctorBasedMatrix< T, ImfR, ImfC, typename View::applied_to >( initialized, dim, dim, lambda ) {}
1516+ internal::FunctorBasedMatrix< T, ImfR, ImfC, typename View::applied_to >( initialized, imf::Id( dim ), imf::Id( dim ) , lambda ) {}
15031517
15041518 /* *
15051519 * Constructor for a view over another functor-based matrix.
@@ -1691,8 +1705,8 @@ namespace alp {
16911705 internal::requires_allocation< ViewType >::value
16921706 > * = nullptr
16931707 >
1694- Matrix ( bool initialized, const size_t dim, typename ViewType::applied_to lambda ) :
1695- internal::FunctorBasedMatrix< T, ImfR, ImfC, typename View::applied_to >( initialized, dim, lambda ) {}
1708+ Matrix ( std::function< bool () > initialized, const size_t dim, typename ViewType::applied_to lambda ) :
1709+ internal::FunctorBasedMatrix< T, ImfR, ImfC, typename View::applied_to >( initialized, imf::Id( dim ), imf::Id( dim ) , lambda ) {}
16961710
16971711 /* *
16981712 * Constructor for a view over another functor-based matrix.
0 commit comments