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 > &) const
  • void operator%= (const valarray< _Tp > &) const β€” modulo slice elements by corresponding elements of v. πŸ“
  • template<class _Dom > void operator&= (const _Expr< _Dom, _Tp > &) const
  • void operator&= (const valarray< _Tp > &) const β€” logical and slice elements with corresponding elements of v.
  • template<class _Dom > void operator*= (const _Expr< _Dom, _Tp > &) const
  • void operator*= (const valarray< _Tp > &) const β€” multiply slice elements by corresponding elements of v. βœ–οΈ
  • template<class _Dom > void operator+= (const _Expr< _Dom, _Tp > &) const
  • void operator+= (const valarray< _Tp > &) const β€” add corresponding elements of v to slice elements.
  • template<class _Dom > void operator-= (const _Expr< _Dom, _Tp > &) const
  • void operator-= (const valarray< _Tp > &) const β€” subtract corresponding elements of v from slice elements.
  • template<class _Dom > void operator/= (const _Expr< _Dom, _Tp > &) const
  • void operator/= (const valarray< _Tp > &) const β€” divide slice elements by corresponding elements of v.
  • template<class _Dom > void operator<<= (const _Expr< _Dom, _Tp > &) const
  • void operator<<= (const valarray< _Tp > &) const β€” left shift slice elements by corresponding elements of v. ⬅️
  • template<class _Dom > void operator= (const _Expr< _Dom, _Tp > &) const
  • void operator= (const _Tp &) const β€” assign all slice elements to t. yes all of them, periodt πŸ‘‘
  • indirect_array & operator= (const indirect_array &) β€” assignment operator. assigns elements to corresponding elements of a.
  • void operator= (const valarray< _Tp > &) const β€” assign slice elements to corresponding elements of v.
  • template<class _Dom > void operator>>= (const _Expr< _Dom, _Tp > &) const
  • void operator>>= (const valarray< _Tp > &) const β€” right shift slice elements by corresponding elements of v. ➑️
  • template<class _Dom > void operator^= (const _Expr< _Dom, _Tp > &) const
  • void operator^= (const valarray< _Tp > &) const β€” logical xor slice elements with corresponding elements of v.
  • template<class _Dom > void operator|= (const _Expr< _Dom, _Tp > &) const
  • void operator|= (const valarray< _Tp > &) const β€” logical or slice elements with corresponding elements of v.

🌈 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 of v.
  • template<class _Tp > void std::indirect_array< _Tp >::operator&= (const valarray< _Tp > &) const β€” logical and slice elements with corresponding elements of v.
  • template<class _Tp > void std::indirect_array< _Tp >::operator*= (const valarray< _Tp > &) const β€” multiply slice elements by corresponding elements of v.
  • template<class _Tp > void std::indirect_array< _Tp >::operator+= (const valarray< _Tp > &) const β€” add corresponding elements of v to slice elements.
  • template<class _Tp > void std::indirect_array< _Tp >::operator-= (const valarray< _Tp > &) const β€” subtract corresponding elements of v from slice elements.
  • template<class _Tp > void std::indirect_array< _Tp >::operator/= (const valarray< _Tp > &) const β€” divide slice elements by corresponding elements of v.
  • template<class _Tp > void std::indirect_array< _Tp >::operator<<= (const valarray< _Tp > &) const β€” left shift slice elements by corresponding elements of v.
  • template<class _Tp > void std::indirect_array< _Tp >::operator>>= (const valarray< _Tp > &) const β€” right shift slice elements by corresponding elements of v.
  • template<class _Tp > void std::indirect_array< _Tp >::operator^= (const valarray< _Tp > &) const β€” logical xor slice elements with corresponding elements of v.
  • template<class _Tp > void std::indirect_array< _Tp >::operator|= (const valarray< _Tp > &) const β€” logical or slice elements with corresponding elements of v.

πŸ‘‘ 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