STD::INDIRECT_ARRAY(3cxx)
π
std::indirect_array< _Tp > β the 3cxx manual, but make it make sense
okay so bestie, welcome to the 3cxx page for std::indirect_array< _Tp > from libstdc++ β¨ this is the whole thing, no skips, no cap π«Ά
πΈ NAME πΈ
std::indirect_array< _Tp > β literally a reference to an arbitrary subset of an array. that's the whole vibe π
π¦ SYNOPSIS π¦
#include <valarray>
β¨ Public Types β¨
typedef _Tp value_typeβ the element type, being honest about itself π
π Public Member Functions π
indirect_array (const indirect_array &)β copy constructor. both slices refer to the same underlying array (yes, they're linked like that π).template<class _Dom > void operator%= (const _Expr< _Dom, _Tp > &) constvoid operator%= (const valarray< _Tp > &) constβ modulo slice elements by corresponding elements ofv. πtemplate<class _Dom > void operator&= (const _Expr< _Dom, _Tp > &) constvoid operator&= (const valarray< _Tp > &) constβ logical and slice elements with corresponding elements ofv.template<class _Dom > void operator*= (const _Expr< _Dom, _Tp > &) constvoid operator*= (const valarray< _Tp > &) constβ multiply slice elements by corresponding elements ofv. βοΈtemplate<class _Dom > void operator+= (const _Expr< _Dom, _Tp > &) constvoid operator+= (const valarray< _Tp > &) constβ add corresponding elements ofvto slice elements.template<class _Dom > void operator-= (const _Expr< _Dom, _Tp > &) constvoid operator-= (const valarray< _Tp > &) constβ subtract corresponding elements ofvfrom slice elements.template<class _Dom > void operator/= (const _Expr< _Dom, _Tp > &) constvoid operator/= (const valarray< _Tp > &) constβ divide slice elements by corresponding elements ofv.template<class _Dom > void operator<<= (const _Expr< _Dom, _Tp > &) constvoid operator<<= (const valarray< _Tp > &) constβ left shift slice elements by corresponding elements ofv. β¬ οΈtemplate<class _Dom > void operator= (const _Expr< _Dom, _Tp > &) constvoid operator= (const _Tp &) constβ assign all slice elements tot. yes all of them, periodt πindirect_array & operator= (const indirect_array &)β assignment operator. assigns elements to corresponding elements ofa.void operator= (const valarray< _Tp > &) constβ assign slice elements to corresponding elements ofv.template<class _Dom > void operator>>= (const _Expr< _Dom, _Tp > &) constvoid operator>>= (const valarray< _Tp > &) constβ right shift slice elements by corresponding elements ofv. β‘οΈtemplate<class _Dom > void operator^= (const _Expr< _Dom, _Tp > &) constvoid operator^= (const valarray< _Tp > &) constβ logical xor slice elements with corresponding elements ofv.template<class _Dom > void operator|= (const _Expr< _Dom, _Tp > &) constvoid operator|= (const valarray< _Tp > &) constβ logical or slice elements with corresponding elements ofv.
π Friends π
class gslice_array< _Tp >class valarray< _Tp >
π Detailed Description π
template<class _Tp>
class std::indirect_array< _Tp >
"Reference to arbitrary subset of an array."
so here's the tea β β an indirect_array is a reference to the actual elements of an array, specified by an ordered array of indices. like, it's not a copy, it's pointing at the real ones, iykyk π
the way you get one is to call operator[](valarray<size_t>) on a valarray. the indirect_array you get back then permits carrying operations out on the referenced subset of elements in the original valarray. slay π
fr fr, here's the example: if an indirect_array is obtained using the array (4,2,0) as an argument, and then assigned to an array containing (1,2,3), then the underlying array will have array[0]==3, array[2]==2, and array[4]==1. iconic behaviour tbh π
πΈ Parameters πΈ
- Tp β element type. that's it, that's the parameter π«Ά
β Member Function Documentation β
okay bestie, here's the detailed section, one by one, no skipping π§
template<class _Tp > void std::indirect_array< _Tp >::operator%= (const valarray< _Tp > &) constβ modulo slice elements by corresponding elements ofv.template<class _Tp > void std::indirect_array< _Tp >::operator&= (const valarray< _Tp > &) constβ logical and slice elements with corresponding elements ofv.template<class _Tp > void std::indirect_array< _Tp >::operator*= (const valarray< _Tp > &) constβ multiply slice elements by corresponding elements ofv.template<class _Tp > void std::indirect_array< _Tp >::operator+= (const valarray< _Tp > &) constβ add corresponding elements ofvto slice elements.template<class _Tp > void std::indirect_array< _Tp >::operator-= (const valarray< _Tp > &) constβ subtract corresponding elements ofvfrom slice elements.template<class _Tp > void std::indirect_array< _Tp >::operator/= (const valarray< _Tp > &) constβ divide slice elements by corresponding elements ofv.template<class _Tp > void std::indirect_array< _Tp >::operator<<= (const valarray< _Tp > &) constβ left shift slice elements by corresponding elements ofv.template<class _Tp > void std::indirect_array< _Tp >::operator>>= (const valarray< _Tp > &) constβ right shift slice elements by corresponding elements ofv.template<class _Tp > void std::indirect_array< _Tp >::operator^= (const valarray< _Tp > &) constβ logical xor slice elements with corresponding elements ofv.template<class _Tp > void std::indirect_array< _Tp >::operator|= (const valarray< _Tp > &) constβ logical or slice elements with corresponding elements ofv.
π Author π
generated automatically by Doxygen for libstdc++ from the source code. not a human, just vibes and a parser π€π
that's the whole page bestie, nothing left out, everything exactly where it belongs πβ¨
sign-off era π β this came to you from libstdc++, the std::indirect_array< _Tp >(3cxx) page, no date on the footer but the whole thing is auto-generated by Doxygen from the source code. go forth and index some arrays π
π¦
π¦ where this page comes from
- ubuntu noble: libstdc++-14-doc 14-20240412-0ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms