valarray File Reference

#include <bits/c++config.h>
#include <cstddef>
#include <cmath>
#include <cstdlib>
#include <numeric>
#include <algorithm>
#include <debug/debug.h>
#include <bits/valarray_array.h>
#include <bits/valarray_before.h>
#include <bits/valarray_after.h>
#include <bits/slice_array.h>
#include <bits/gslice.h>
#include <bits/gslice_array.h>
#include <bits/mask_array.h>
#include <bits/indirect_array.h>

Go to the source code of this file.

Namespaces

namespace  std

Classes

class  std::valarray< _Tp >
 Smart array designed to support numeric processing. More...
struct  std::valarray< _Tp >::_UnaryOp< _Op >

Defines

#define _GLIBCXX_VALARRAY   1
#define _DEFINE_VALARRAY_UNARY_OPERATOR(_Op, _Name)
#define _DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT(_Op, _Name)
#define _DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT(_Op, _Name)
#define _DEFINE_BINARY_OPERATOR(_Op, _Name)


Detailed Description

This is a Standard C++ Library header.

Definition in file valarray.


Define Documentation

#define _DEFINE_BINARY_OPERATOR ( _Op,
_Name   ) 

Value:

template<typename _Tp>                      \
    inline _Expr<_BinClos<_Name, _ValArray, _ValArray, _Tp, _Tp>,       \
                 typename __fun<_Name, _Tp>::result_type>               \
    operator _Op(const valarray<_Tp>& __v, const valarray<_Tp>& __w)    \
    {                                   \
      _GLIBCXX_DEBUG_ASSERT(__v.size() == __w.size());                  \
      typedef _BinClos<_Name, _ValArray, _ValArray, _Tp, _Tp> _Closure; \
      typedef typename __fun<_Name, _Tp>::result_type _Rt;              \
      return _Expr<_Closure, _Rt>(_Closure(__v, __w));                  \
    }                                   \
                                    \
  template<typename _Tp>                        \
    inline _Expr<_BinClos<_Name, _ValArray,_Constant, _Tp, _Tp>,        \
                 typename __fun<_Name, _Tp>::result_type>               \
    operator _Op(const valarray<_Tp>& __v, const _Tp& __t)      \
    {                                   \
      typedef _BinClos<_Name, _ValArray, _Constant, _Tp, _Tp> _Closure; \
      typedef typename __fun<_Name, _Tp>::result_type _Rt;              \
      return _Expr<_Closure, _Rt>(_Closure(__v, __t));                  \
    }                                   \
                                    \
  template<typename _Tp>                        \
    inline _Expr<_BinClos<_Name, _Constant, _ValArray, _Tp, _Tp>,       \
                 typename __fun<_Name, _Tp>::result_type>               \
    operator _Op(const _Tp& __t, const valarray<_Tp>& __v)      \
    {                                   \
      typedef _BinClos<_Name, _Constant, _ValArray, _Tp, _Tp> _Closure; \
      typedef typename __fun<_Name, _Tp>::result_type _Rt;              \
      return _Expr<_Closure, _Tp>(_Closure(__t, __v));                  \
    }

Definition at line 957 of file valarray.

#define _DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT ( _Op,
_Name   ) 

Value:

template<class _Tp>                         \
    inline valarray<_Tp>&                       \
    valarray<_Tp>::operator _Op##=(const _Tp &__t)          \
    {                                   \
      _Array_augmented_##_Name(_Array<_Tp>(_M_data), _M_size, __t); \
      return *this;                         \
    }                                   \
                                    \
  template<class _Tp>                           \
    inline valarray<_Tp>&                       \
    valarray<_Tp>::operator _Op##=(const valarray<_Tp> &__v)        \
    {                                   \
      _GLIBCXX_DEBUG_ASSERT(_M_size == __v._M_size);                    \
      _Array_augmented_##_Name(_Array<_Tp>(_M_data), _M_size,       \
                   _Array<_Tp>(__v._M_data));       \
      return *this;                         \
    }

Definition at line 902 of file valarray.

#define _DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT ( _Op,
_Name   ) 

Value:

template<class _Tp> template<class _Dom>                \
    inline valarray<_Tp>&                       \
    valarray<_Tp>::operator _Op##=(const _Expr<_Dom, _Tp>& __e)     \
    {                                   \
      _Array_augmented_##_Name(_Array<_Tp>(_M_data), __e, _M_size); \
      return *this;                         \
    }

Definition at line 934 of file valarray.

#define _DEFINE_VALARRAY_UNARY_OPERATOR ( _Op,
_Name   ) 

Value:

template<typename _Tp>                      \
    inline typename valarray<_Tp>::template _UnaryOp<_Name>::_Rt        \
    valarray<_Tp>::operator _Op() const                 \
    {                                   \
      typedef _UnClos<_Name, _ValArray, _Tp> _Closure;                  \
      typedef typename __fun<_Name, _Tp>::result_type _Rt;              \
      return _Expr<_Closure, _Rt>(_Closure(*this));         \
    }

Definition at line 885 of file valarray.

#define _GLIBCXX_VALARRAY   1

Definition at line 38 of file valarray.


Generated on Tue Feb 2 16:57:30 2010 for GNU C++ STL by  doxygen 1.4.7