Standard C++ Library Reference ISO/IEC (VERSION3)
private:
private:
void indirect_array(); // not defined
void indirect_array(
const indirect_array&); // not defined
indirect_array& operator=(
const indirect_array&); // not defined
};
The class describes an object that stores a reference to an object va of class valarray<Ty>, along with an
object xa of class valarray<size_t> which describes the sequence of elements to select from the
valarray<Ty> object.
You construct an indirect_array<Ty> object only by writing an expression of the form va[xa]. The
member functions of class indirect_array then behave like the corresponding function signatures
defined for valarray<Ty>, except that only the sequence of selected elements is affected.
The sequence consists of xa.size() elements, where element I becomes the index xa[I] within va. For
example:
const size_t vi[] = {7, 5, 2, 3, 8};
// va[valarray<size_t>(vi, 5)] selects elements with
// indices 7, 5, 2, 3, 8
log
template<class Ty>
valarray<Ty> log(const valarray<Ty>& left);
The template function returns an object of class valarray<Ty>, each of whose elements I is the natural
logarithm of left[I].
log10
template<class Ty>
valarray<Ty> log10(const valarray<Ty>& left);
The template function returns an object of class valarray<Ty>, each of whose elements I is the base-10
logarithm of left[I].
mask_array
template<class Ty>
class mask_array {
public:
typedef Ty value_type;
void operator=(const valarray<Ty> right) const;
void operator=(const Ty& right) const;
void operator*=(const valarray<Ty> right) const;
void operator/=(const valarray<Ty> right) const;
void operator%=(const valarray<Ty> right) const;