Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Standard C++ Library Module Reference Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

slice_array

Module:  Standard C++ Library   Library:  Numerics


Does not inherit

Local Index

Members

Summary

A numeric array class for representing a BLAS-like slice from a valarray

Synopsis

#include <valarray>

namespace std {
  template <class T>
  class slice_array;
}

Description

The valarray helper class slice_array gives a slice view into a valarray. A slice_array is only produced by applying the slice subscript operator to a valarray. The elements in a slice_array are references to selected elements in the valarray (so changing an element in the slice_array really changes the corresponding element in the valarray). A slice_array does not itself hold any distinct elements. The template cannot be instantiated directly since all its constructors are private. However, you can easily copy a slice_array to a valarray using either the valarray copy constructor or the assignment operator. Reference semantics are lost at that point.

Interface

Constructors

slice_array();
slice_array(const slice_array&);

Assignment Operators

void operator=(const valarray<T>& x) const;
slice_array<T>& 
operator=(const slice-_array<T>& x);
void operator=(const T& x);

Computed Assignment Operators

void operator*=(const valarray<T>& val) const;
void operator/=(const valarray<T>& val) const;
void operator%=(const valarray<T>& val) const;
void operator+=(const valarray<T>& val) const;
void operator-=(const valarray<T>& val) const;
void operator^=(const valarray<T>& val) const;
void operator&=(const valarray<T>& val) const;
void operator|=(const valarray<T>& val) const;
void operator<<=(const valarray<T>& val) const;
void operator>>=(const valarray<T>& val) const;

Example

See Also

slice, valarray, gslice, gslice_array, mask_array, indirect_array

Standards Conformance

ISO/IEC 14882:1998 -- International Standard for Information Systems -- Programming Language C++, Section 26.3.5



Previous fileTop of DocumentContentsIndex pageNext file

Copyright (c) 1994-2006 Rogue Wave Software, a Quovadx Division.
Licensed under the Apache License, Version 2.0.
Contact Rogue Wave about documentation or support issues. You can also seek help from other developers through the Apache stdcxx community (see below).

For more information on the Rogue Wave Standard C++ Library under open source, see Section 1.2 of the user's guide.