FixedArray< 0, T > Class Template Reference

Partial template specialization for N = 0. More...

#include <FixedArray0.h>

List of all members.

Public Types

STL container requirements.

typedef Types::value_type value_type
 The element type of the array.
typedef Types::parameter_type parameter_type
 The parameter type for the value type.
typedef Types::pointer pointer
 A pointer to an array element.
typedef Types::const_pointer const_pointer
 A const pointer to an array element.
typedef Types::iterator iterator
 An iterator in the array.
typedef Types::const_iterator const_iterator
 A const iterator in the array.
typedef Types::reference reference
 A reference to an array element.
typedef Types::const_reference const_reference
 A const reference to an array element.
typedef Types::size_type size_type
 The size type is a signed integer.
typedef Types::difference_type difference_type
 Pointer difference type.

Public Member Functions

Constructors etc.

 FixedArray ()
 Default constructor. Leave the data uninitialized.
 ~FixedArray ()
 Trivial destructor.
 FixedArray (const FixedArray &x)
 Copy constructor.
template<typename T2 >
 FixedArray (const FixedArray< 0, T2 > &x)
 Copy constructor for a FixedArray of different type.
 FixedArray (parameter_type x)
 Constructor. Specify the component.
 FixedArray (const void *vp)
 Constructor. Initialize from a C array.
Assignment operators.

FixedArrayoperator= (const FixedArray &x)
 Assignment operator.
FixedArrayoperator= (parameter_type x)
 Assignment operator. Assign from a value.
template<typename T2 >
FixedArrayoperator= (const FixedArray< 0, T2 > &x)
 Assignment operator for a FixedArray of different type.
template<typename T2 , bool A>
FixedArrayoperator= (const Array< 1, T2, A > &x)
 Assignment operator for an Array.
Accessors.

const_iterator begin () const
 Return a const_iterator to the beginning of the data.
const_iterator end () const
 Return a const_iterator to the end of the data.
const_pointer data () const
 Return a const_pointer to the data.
template<typename EqualityComparable >
bool has (const EqualityComparable &x) const
 Return true if this array has the element x.
bool is_sorted () const
 Return true.
template<class StrictWeakOrdering >
bool is_sorted (StrictWeakOrdering comp) const
 Return true.
Manipulators.

iterator begin ()
 Return an iterator to the beginning of the data.
iterator end ()
 Return an iterator to the end of the data.
pointer data ()
 Return a pointer to the data.
void swap (FixedArray &x)
 Swaps data with another FixedArray of the same size and type.
void negate ()
 Negate each component.
void fill (parameter_type value)
 Fill the array with the given value.
template<typename InputIterator >
void copy (InputIterator start, InputIterator finish)
 Copy the specified range into the array.
void sort ()
 Sort the elements of the array.
template<class StrictWeakOrdering >
void sort (StrictWeakOrdering comp)
 Sort the elements of the array.
Assignment operators with scalar operand.

FixedArrayoperator+= (parameter_type x)
 Add x to each component.
FixedArrayoperator-= (parameter_type x)
 Subtract x from each component.
FixedArrayoperator*= (parameter_type x)
 Multiply each component by x.
FixedArrayoperator/= (parameter_type x)
 Divide each component by x.
FixedArrayoperator%= (parameter_type x)
 Mod each component by x.
FixedArrayoperator<<= (const int offset)
 Left-shift each component by the offset.
FixedArrayoperator>>= (const int offset)
 Right-shift each component by the offset.
Assignment operators with FixedArray operand.

template<typename T2 >
FixedArrayoperator+= (const FixedArray< 0, T2 > &x)
 Add x to this.
template<typename T2 >
FixedArrayoperator-= (const FixedArray< 0, T2 > &x)
 Subtract x from this.
template<typename T2 >
FixedArrayoperator*= (const FixedArray< 0, T2 > &x)
 Multiply this by x.
template<typename T2 >
FixedArrayoperator/= (const FixedArray< 0, T2 > &x)
 Divide this by x.
template<typename T2 >
FixedArrayoperator%= (const FixedArray< 0, T2 > &x)
 Mod this by x.
Math functions.

void abs ()
 Apply the absolute value ($|x|$) to each array element.
void acos ()
 Apply the inverse cosine ($ \cos^{-1}(x) $) to each array element.
void asin ()
 Apply the inverse sine ($ \sin^{-1}(x) $) to each array element.
void atan ()
 Apply the inverse tangent ($ \tan^{-1}(x) $) to each array element.
void ceil ()
 Apply the ceiling function ($ \lceil x \rceil $) to each array element.
void cos ()
 Apply the cosine ($ \cos(x) $) to each array element.
void cosh ()
 Apply the hyperbolic cosine ($ \cosh(x) $) to each array element.
void exp ()
 Apply the exponential function ($ \mathrm{e}^x $) to each array element.
void floor ()
 Apply the floor function ($ \lfloor x \rfloor $) to each array element.
void log ()
 Apply the natural logarithm ($ \ln(x) $) to each array element.
void log10 ()
 Apply the logarithm base 10 ($ \log_{10}(x) $) to each array element.
void sin ()
 Apply the sine ($ \sin(x) $) to each array element.
void sinh ()
 Apply the hyperbolic sine ($ \sinh(x) $) to each array element.
void sqrt ()
 Apply the square root ($ \sqrt{x} $) to each array element.
void tan ()
 Apply the tangent ($ \tan(x) $) to each array element.
void tanh ()
 Apply the hyperbolic tangent ($ \tanh(x) $) to each array element.

Static Public Member Functions

Static members.

static size_type size ()
 Return the size of the array.
static bool empty ()
 Return true if the array has zero size.
static size_type max_size ()
 Return the size of the largest possible FixedArray.

Detailed Description

template<typename T>
class FixedArray< 0, T >

Partial template specialization for N = 0.


Member Typedef Documentation

template<typename T >
typedef Types::size_type FixedArray< 0, T >::size_type

The size type is a signed integer.

Having std::size_t (which is an unsigned integer) as the size type causes minor problems. Consult "Large Scale C++ Software Design" by John Lakos for a discussion of using unsigned integers in a class interface.


The documentation for this class was generated from the following file:
Generated on Thu Jun 30 02:14:51 2016 for Algorithms and Data Structures Package by  doxygen 1.6.3