diff --git a/src/TiledArray/expressions/tsr_expr.h b/src/TiledArray/expressions/tsr_expr.h index 68e036f4c4..e17ee2ddfa 100644 --- a/src/TiledArray/expressions/tsr_expr.h +++ b/src/TiledArray/expressions/tsr_expr.h @@ -523,6 +523,24 @@ class TsrExpr : public Expr> { /// Block expression + /// \tparam Index1 An integral range type + /// \tparam Index2 An integral range type + /// \param lower_bound The lower_bound of the block + /// \param upper_bound The upper_bound of the block + template && + TiledArray::detail::is_integral_range_v>> + BlkTsrExpr block(const Index1& lower_bound, + const Index2& upper_bound, + preserve_lobound_t) const { + return BlkTsrExpr(array_, annotation_, lower_bound, + upper_bound) + .preserve_lobound(); + } + + /// Block expression + /// \tparam Index1 An integral type /// \tparam Index2 An integral type /// \param lower_bound The lower_bound of the block @@ -539,8 +557,27 @@ class TsrExpr : public Expr> { /// Block expression + /// \tparam Index1 An integral type + /// \tparam Index2 An integral type + /// \param lower_bound The lower_bound of the block + /// \param upper_bound The upper_bound of the block + template && + std::is_integral_v>> + BlkTsrExpr block( + const std::initializer_list& lower_bound, + const std::initializer_list& upper_bound, + preserve_lobound_t) const { + return BlkTsrExpr(array_, annotation_, lower_bound, + upper_bound) + .preserve_lobound(); + } + + /// Block expression + /// \tparam PairRange Type representing a range of generalized pairs (see - /// TiledArray::detail::is_gpair_v ) \param bounds The {lower,upper} bounds of + /// TiledArray::detail::is_gpair_v ) + /// \param bounds The {lower,upper} bounds of /// the block template : public Expr> { /// Block expression + /// \tparam PairRange Type representing a range of generalized pairs (see + /// TiledArray::detail::is_gpair_v ) + /// \param bounds The {lower,upper} bounds of + /// the block + template >> + BlkTsrExpr block(const PairRange& bounds, + preserve_lobound_t) const { + return BlkTsrExpr(array_, annotation_, bounds) + .preserve_lobound(); + } + + /// Block expression + /// \tparam Index An integral type /// \param bounds The {lower,upper} bounds of the block template : public Expr> { return BlkTsrExpr(array_, annotation_, bounds); } + /// Block expression + + /// \tparam Index An integral type + /// \param bounds The {lower,upper} bounds of the block + template >> + BlkTsrExpr block( + const std::initializer_list>& bounds, + preserve_lobound_t) const { + return BlkTsrExpr(array_, annotation_, bounds) + .preserve_lobound(); + } + /// Conjugated-tensor expression factor /// \return A conjugated expression object