mindex: setSub
This commit is contained in:
parent
40fd0251db
commit
3835859a5e
2 changed files with 16 additions and 0 deletions
|
@ -629,6 +629,15 @@ namespace CNORXZ
|
|||
return *this;
|
||||
}
|
||||
|
||||
template <class FormatT, class... Indices>
|
||||
template <SizeT I>
|
||||
GMIndex<FormatT,Indices...>& GMIndex<FormatT,Indices...>::setSub(CSizeT<I> ind, SizeT lex)
|
||||
{
|
||||
mIPack[ind] = lex;
|
||||
return operator()();
|
||||
}
|
||||
|
||||
|
||||
template <class... Indices>
|
||||
constexpr decltype(auto) mindex(const Sptr<Indices>&... is)
|
||||
{
|
||||
|
|
|
@ -182,6 +182,13 @@ namespace CNORXZ
|
|||
/** Assign new index format. */
|
||||
GMIndex& setFormat(const FormatT& bs);
|
||||
|
||||
/** Set position of given sub index and update total index position.
|
||||
@param ind Sub-index number [0,dim()-1].
|
||||
@param lex Lexicographic position to be assigned to the index.
|
||||
*/
|
||||
template <SizeT I>
|
||||
GMIndex& setSub(CSizeT<I> ind, SizeT lex);
|
||||
|
||||
private:
|
||||
template <SizeT... Is>
|
||||
static constexpr decltype(auto) mkLexFormat(const SPack<Indices...>& ipack, Isq<Is...> is);
|
||||
|
|
Loading…
Reference in a new issue