# std::slice_array< _Tp > Class Template Reference

List of all members.

## Detailed Description

### template<typename _Tp>
class std::slice_array< _Tp >

A slice_array is a reference to the actual elements of an array specified by a slice. The way to get a slice_array is to call operator[](slice) on a valarray. The returned slice_array then permits carrying operations out on the referenced subset of elements in the original valarray. For example, operator+=(valarray) will add values to the subset of elements in the underlying valarray this slice_array refers to.

Parameters:

  | Tp | Element type.

Definition at line 121 of file slice_array.h.

## Public Types

- typedef _Tp value_type

## Public Member Functions

- template<class _Dom> void operator &= (const _Expr< _Dom, _Tp > &) const
- void operator &= (const valarray< _Tp > &) const
- template<class _Dom> void operator *= (const _Expr< _Dom, _Tp > &) const
- void operator *= (const valarray< _Tp > &) const
- template<class _Dom> void operator%= (const _Expr< _Dom, _Tp > &) const
- void operator%= (const valarray< _Tp > &) const
- template<class _Dom> void operator+= (const _Expr< _Dom, _Tp > &) const
- void operator+= (const valarray< _Tp > &) const
- template<class _Dom> void operator-= (const _Expr< _Dom, _Tp > &) const
- void operator-= (const valarray< _Tp > &) const
- template<class _Dom> void operator/= (const _Expr< _Dom, _Tp > &) const
- void operator/= (const valarray< _Tp > &) const
- template<class _Dom> void operator<<= (const _Expr< _Dom, _Tp > &) const
- void operator<<= (const valarray< _Tp > &) const
- template<class _Dom> void operator= (const _Expr< _Dom, _Tp > &) const
- void operator= (const _Tp &) const
- void operator= (const valarray< _Tp > &) const
- slice_array & operator= (const slice_array &)
- template<class _Dom> void operator>>= (const _Expr< _Dom, _Tp > &) const
- void operator>>= (const valarray< _Tp > &) const
- template<class _Dom> void operator^= (const _Expr< _Dom, _Tp > &) const
- void operator^= (const valarray< _Tp > &) const
- template<class _Dom> void operator|= (const _Expr< _Dom, _Tp > &) const
- void operator|= (const valarray< _Tp > &) const
- slice_array (const slice_array &)

## Friends

- class valarray< _Tp >

## Constructor & Destructor Documentation

template<typename _Tp>

std::slice_array< _Tp >::slice_array | ( | const slice_array< _Tp > & |  | ) | `[inline]`

Copy constructor. Both slices refer to the same underlying array.

Definition at line 205 of file slice_array.h.

## Member Function Documentation

template<typename _Tp>

void std::slice_array< _Tp >::operator &= | ( | const valarray< _Tp > & |  | ) | const`[inline]`

Logical and slice elements with corresponding elements of v.

Definition at line 260 of file slice_array.h.

template<typename _Tp>

void std::slice_array< _Tp >::operator *= | ( | const valarray< _Tp > & |  | ) | const`[inline]`

Multiply slice elements by corresponding elements of v.

Definition at line 254 of file slice_array.h.

template<typename _Tp>

void std::slice_array< _Tp >::operator%= | ( | const valarray< _Tp > & |  | ) | const`[inline]`

Modulo slice elements by corresponding elements of v.

Definition at line 256 of file slice_array.h.

template<typename _Tp>

void std::slice_array< _Tp >::operator+= | ( | const valarray< _Tp > & |  | ) | const`[inline]`

Add corresponding elements of v to slice elements.

Definition at line 257 of file slice_array.h.

template<typename _Tp>

void std::slice_array< _Tp >::operator-= | ( | const valarray< _Tp > & |  | ) | const`[inline]`

Subtract corresponding elements of v from slice elements.

Definition at line 258 of file slice_array.h.

template<typename _Tp>

void std::slice_array< _Tp >::operator/= | ( | const valarray< _Tp > & |  | ) | const`[inline]`

Divide slice elements by corresponding elements of v.

Definition at line 255 of file slice_array.h.

template<typename _Tp>

void std::slice_array< _Tp >::operator<<= | ( | const valarray< _Tp > & |  | ) | const`[inline]`

Left shift slice elements by corresponding elements of v.

Definition at line 262 of file slice_array.h.

template<typename _Tp>

void std::slice_array< _Tp >::operator= | ( | const _Tp & |  | ) | const`[inline]`

Assign all slice elements to t.

Definition at line 222 of file slice_array.h.

References std::__valarray_fill().

template<typename _Tp>

void std::slice_array< _Tp >::operator= | ( | const valarray< _Tp > & |  | ) | const`[inline]`

Assign slice elements to corresponding elements of v.

Definition at line 227 of file slice_array.h.

References std::__valarray_copy().

template<typename _Tp>

slice_array< _Tp > & std::slice_array< _Tp >::operator= | ( | const slice_array< _Tp > & |  | ) | `[inline]`

elements of a.

Definition at line 213 of file slice_array.h.

References std::__valarray_copy(), std::slice_array< _Tp >::_M_array, std::slice_array< _Tp >::_M_stride, and std::slice_array< _Tp >::_M_sz.

template<typename _Tp>

void std::slice_array< _Tp >::operator>>= | ( | const valarray< _Tp > & |  | ) | const`[inline]`

Right shift slice elements by corresponding elements of v.

Definition at line 263 of file slice_array.h.

template<typename _Tp>

void std::slice_array< _Tp >::operator^= | ( | const valarray< _Tp > & |  | ) | const`[inline]`

Logical xor slice elements with corresponding elements of v.

Definition at line 259 of file slice_array.h.

template<typename _Tp>

void std::slice_array< _Tp >::operator|= | ( | const valarray< _Tp > & |  | ) | const`[inline]`

Logical or slice elements with corresponding elements of v.

Definition at line 261 of file slice_array.h.

The documentation for this class was generated from the following file:

- slice_array.h