FixedArray< N, T > Class Template Reference

A fixed size array with size N and type T. More...

#include <FixedArray.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.

The size and element type are template parameters. One can use the default constructor, FixedArray(), to make an array of uninitialized elements.

    ads::FixedArray<3,double> a;
    ads::FixedArray<7,char> b;
    ads::FixedArray<11,double**> c;

The default element type is double. Below is an array of double's.

    ads::FixedArray<3> a;

Note that since the size is a template parameter, it must be known at compile time. The following would generate a compile time error.

    int n;
    std::cin >> n;
    ads::FixedArray<n,int> a;
 FixedArray ()
 Default constructor. Leave the data uninitialized.
 ~FixedArray ()
 Trivial destructor.
 FixedArray (const FixedArray &x)
 Copy constructor.
template<typename T2 >
 FixedArray (const FixedArray< N, T2 > &x)
 Copy constructor for a FixedArray of different type.
 FixedArray (parameter_type x)
 Constructor. Specify an initializing value for the components.
 FixedArray (const const_pointer p)
 Constructor. Initialize from a C array of the value type.
 FixedArray (const void *p)
 Constructor. Initialize from a block of memory.
 FixedArray (parameter_type x0, parameter_type x1)
 Constructor. Specify the two components.
 FixedArray (parameter_type x0, parameter_type x1, parameter_type x2)
 Constructor. Specify the three components.
 FixedArray (parameter_type x0, parameter_type x1, parameter_type x2, parameter_type x3)
 Constructor. Specify the four components.
 FixedArray (parameter_type x0, parameter_type x1, parameter_type x2, parameter_type x3, parameter_type x4)
 Constructor. Specify the five components.
 FixedArray (parameter_type x0, parameter_type x1, parameter_type x2, parameter_type x3, parameter_type x4, parameter_type x5)
 Constructor. Specify the six components.
 FixedArray (parameter_type x0, parameter_type x1, parameter_type x2, parameter_type x3, parameter_type x4, parameter_type x5, parameter_type x6)
 Constructor. Specify the seven components.
 FixedArray (parameter_type x0, parameter_type x1, parameter_type x2, parameter_type x3, parameter_type x4, parameter_type x5, parameter_type x6, parameter_type x7)
 Constructor. Specify the eight components.
Assignment operators.

FixedArrayoperator= (const FixedArray &x)
 Assignment operator.
template<typename T2 >
FixedArrayoperator= (const FixedArray< N, 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.
FixedArrayoperator= (parameter_type x)
 Assignment operator. Assign from a value.
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.
parameter_type operator() (const int i) const
 Subscripting. Return the i_th component.
parameter_type operator[] (const int i) const
 Subscripting. Return the i_th component.
template<typename EqualityComparable >
const_iterator find (const EqualityComparable &x) const
 Linear search for x.
template<typename EqualityComparable >
int find_index (const EqualityComparable &x) const
 Linear search for x. Return the index of the matching element.
template<typename EqualityComparable >
bool has (const EqualityComparable &x) const
 Return true if this array has the element x.
bool is_sorted () const
 Return true if the array is in sorted order.
template<class StrictWeakOrdering >
bool is_sorted (StrictWeakOrdering comp) const
 Return true if the array is in sorted order.
int min_index () const
 Return the index of the minimum element.
template<class StrictWeakOrdering >
int min_index (StrictWeakOrdering comp) const
 Return the index of the minimum element using the comparison functor.
int max_index () const
 Return the index of the maximum element.
template<class StrictWeakOrdering >
int max_index (StrictWeakOrdering comp) const
 Return the index of the maximum element using the comparison functor.
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.
reference operator() (const int i)
 Subscripting. Return a reference to the i_th component.
reference operator[] (const int i)
 Subscripting. Return a reference to the i_th component.
void swap (FixedArray &x)
 Swaps data with another FixedArray of the same size and type.
template<typename EqualityComparable >
iterator find (const EqualityComparable &x)
 Linear search for x.
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<<= (int offset)
 Left-shift each component by the offset.
FixedArrayoperator>>= (int offset)
 Right-shift each component by the offset.
Assignment operators with FixedArray operand.

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

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.

Related Functions

(Note that these are not member functions.)



template<int N, typename T >
FixedArray< N, T > & operator+ (FixedArray< N, T > &x)
 Unary positive operator.
template<int N, typename T >
FixedArray< N, T > operator- (const FixedArray< N, T > &x)
 Unary negate operator.
template<int N, typename T >
FixedArray< N, T > operator+ (const FixedArray< N, T > &x, const typename FixedArray< N, T >::parameter_type value)
 FixedArray-scalar addition.
template<int N, typename T >
FixedArray< N, T > operator+ (const typename FixedArray< N, T >::parameter_type value, const FixedArray< N, T > &x)
 Scalar-FixedArray addition.
template<int N, typename T >
FixedArray< N, T > operator+ (const FixedArray< N, T > &x, const FixedArray< N, T > &y)
 FixedArray-FixedArray addition.
template<int N, typename T >
FixedArray< N, T > operator- (const FixedArray< N, T > &x, const typename FixedArray< N, T >::parameter_type value)
 FixedArray-scalar subtraction.
template<int N, typename T >
FixedArray< N, T > operator- (const typename FixedArray< N, T >::parameter_type value, const FixedArray< N, T > &x)
 Scalar-FixedArray subtraction.
template<int N, typename T >
FixedArray< N, T > operator- (const FixedArray< N, T > &x, const FixedArray< N, T > &y)
 FixedArray-FixedArray subtraction.
template<int N, typename T >
FixedArray< N, T > operator* (const FixedArray< N, T > &x, const typename FixedArray< N, T >::parameter_type value)
 FixedArray-scalar multiplication.
template<int N, typename T >
FixedArray< N, T > operator* (const typename FixedArray< N, T >::parameter_type value, const FixedArray< N, T > &x)
 Scalar-FixedArray multiplication.
template<int N, typename T >
FixedArray< N, T > operator* (const FixedArray< N, T > &x, const FixedArray< N, T > &y)
 FixedArray-FixedArray multiplication.
template<int N, typename T >
FixedArray< N, T > operator/ (const FixedArray< N, T > &x, const typename FixedArray< N, T >::parameter_type value)
 FixedArray-scalar division.
template<int N, typename T >
FixedArray< N, T > operator/ (const typename FixedArray< N, T >::parameter_type value, const FixedArray< N, T > &x)
 Scalar-FixedArray division.
template<int N, typename T >
FixedArray< N, T > operator/ (const FixedArray< N, T > &x, const FixedArray< N, T > &y)
 FixedArray-FixedArray division.
template<int N, typename T >
FixedArray< N, T > operator% (const FixedArray< N, T > &x, const typename FixedArray< N, T >::parameter_type value)
 FixedArray-scalar modulus.
template<int N, typename T >
FixedArray< N, T > operator% (const typename FixedArray< N, T >::parameter_type value, const FixedArray< N, T > &x)
 Scalar-FixedArray modulus.
template<int N, typename T >
FixedArray< N, T > operator% (const FixedArray< N, T > &x, const FixedArray< N, T > &y)
 FixedArray-FixedArray modulus.
template<int N, typename T >
computeSum (const FixedArray< N, T > &x)
 Return the sum of the components.
template<int N, typename T >
computeProduct (const FixedArray< N, T > &x)
 Return the product of the components.
template<int N, typename T >
computeMinimum (const FixedArray< N, T > &x)
 Return the minimum component. Use < for comparison.
template<int N, typename T >
computeMaximum (const FixedArray< N, T > &x)
 Return the maximum component. Use > for comparison.
template<int N, typename T >
FixedArray< N, T > computeMaximum (const FixedArray< N, T > &x, const FixedArray< N, T > &y)
 Return a FixedArray that is element-wise the maximum of the two.
template<int N, typename T >
FixedArray< N, T > computeMinimum (const FixedArray< N, T > &x, const FixedArray< N, T > &y)
 Return a FixedArray that is element-wise the minimum of the two.
template<int N, typename T >
void applyAbs (FixedArray< N, T > *x)
 Apply the absolute value ($|x|$) to each array element.
template<int N, typename T >
void applyAcos (FixedArray< N, T > *x)
 Apply the inverse cosine ($ \cos^{-1}(x) $) to each array element.
template<int N, typename T >
void applyAsin (FixedArray< N, T > *x)
 Apply the inverse sine ($ \sin^{-1}(x) $) to each array element.
template<int N, typename T >
void applyAtan (FixedArray< N, T > *x)
 Apply the inverse tangent ($ \tan^{-1}(x) $) to each array element.
template<int N, typename T >
void applyCeil (FixedArray< N, T > *x)
 Apply the ceiling function ($ \lceil x \rceil $) to each array element.
template<int N, typename T >
void applyCos (FixedArray< N, T > *x)
 Apply the cosine ($ \cos(x) $) to each array element.
template<int N, typename T >
void applyCosh (FixedArray< N, T > *x)
 Apply the hyperbolic cosine ($ \cosh(x) $) to each array element.
template<int N, typename T >
void applyExp (FixedArray< N, T > *x)
 Apply the exponential function ($ \mathrm{e}^x $) to each array element.
template<int N, typename T >
void applyFloor (FixedArray< N, T > *x)
 Apply the floor function ($ \lfloor x \rfloor $) to each array element.
template<int N, typename T >
void applyLog (FixedArray< N, T > *x)
 Apply the natural logarithm ($ \ln(x) $) to each array element.
template<int N, typename T >
void applyLog10 (FixedArray< N, T > *x)
 Apply the logarithm base 10 ($ \log_{10}(x) $) to each array element.
template<int N, typename T >
void applySin (FixedArray< N, T > *x)
 Apply the sine ($ \sin(x) $) to each array element.
template<int N, typename T >
void applySinh (FixedArray< N, T > *x)
 Apply the hyperbolic sine ($ \sinh(x) $) to each array element.
template<int N, typename T >
void applySqrt (FixedArray< N, T > *x)
 Apply the square root ($ \sqrt{x} $) to each array element.
template<int N, typename T >
void applyTan (FixedArray< N, T > *x)
 Apply the tangent ($ \tan(x) $) to each array element.
template<int N, typename T >
void applyTanh (FixedArray< N, T > *x)
 Apply the hyperbolic tangent ($ \tanh(x) $) to each array element.
template<int N, typename T >
FixedArray< N, T > abs (FixedArray< N, T > x)
 Return the absolute value ($|x|$) applied to each array element.
template<int N, typename T >
FixedArray< N, T > acos (FixedArray< N, T > x)
 Return the inverse cosine ($ \cos^{-1}(x) $) appiled to each array element.
template<int N, typename T >
FixedArray< N, T > asin (FixedArray< N, T > x)
 Return the inverse sine ($ \sin^{-1}(x) $) applied to each array element.
template<int N, typename T >
FixedArray< N, T > atan (FixedArray< N, T > x)
 Return the inverse tangent ($ \tan^{-1}(x) $) applied to each array element.
template<int N, typename T >
FixedArray< N, T > ceil (FixedArray< N, T > x)
 Return the ceiling function ($ \lceil x \rceil $) applied to each array element.
template<int N, typename T >
FixedArray< N, T > cos (FixedArray< N, T > x)
 Return the cosine ($ \cos(x) $) applied to each array element.
template<int N, typename T >
FixedArray< N, T > cosh (FixedArray< N, T > x)
 Return the hyperbolic cosine ($ \cosh(x) $) applied to each array element.
template<int N, typename T >
FixedArray< N, T > exp (FixedArray< N, T > x)
 Return the exponential function ($ \mathrm{e}^x $) applied to each array element.
template<int N, typename T >
FixedArray< N, T > floor (FixedArray< N, T > x)
 Return the floor function ($ \lfloor x \rfloor $) applied to each array element.
template<int N, typename T >
FixedArray< N, T > log (FixedArray< N, T > x)
 Return the natural logarithm ($ \ln(x) $) applied to each array element.
template<int N, typename T >
FixedArray< N, T > log10 (FixedArray< N, T > x)
 Return the logarithm base 10 ($ \log_{10}(x) $) applied to each array element.
template<int N, typename T >
FixedArray< N, T > sin (FixedArray< N, T > x)
 Return the sine ($ \sin(x) $) applied to each array element.
template<int N, typename T >
FixedArray< N, T > sinh (FixedArray< N, T > x)
 Return the hyperbolic sine ($ \sinh(x) $) applied to each array element.
template<int N, typename T >
FixedArray< N, T > sqrt (FixedArray< N, T > x)
 Return the square root ($ \sqrt{x} $) applied to each array element.
template<int N, typename T >
FixedArray< N, T > tan (FixedArray< N, T > x)
 Return the tangent ($ \tan(x) $) applied to each array element.
template<int N, typename T >
FixedArray< N, T > tanh (FixedArray< N, T > x)
 Return the hyperbolic tangent ($ \tanh(x) $) applied to each array element.
template<typename T1 , typename T2 , int N>
bool operator== (const FixedArray< N, T1 > &a, const FixedArray< N, T2 > &b)
 Return true if the arrays are equal.
template<typename T1 , typename T2 , int N>
bool operator!= (const FixedArray< N, T1 > &a, const FixedArray< N, T2 > &b)
 Return true if the arrays are not equal.
template<typename T1 , typename T2 , int N>
bool operator< (const FixedArray< N, T1 > &a, const FixedArray< N, T2 > &b)
 Lexicographical less than comparison.
template<typename T1 , typename T2 , int N>
bool operator> (const FixedArray< N, T1 > &a, const FixedArray< N, T2 > &b)
 Lexicographical greater than comparison.
template<typename T1 , typename T2 , int N>
bool operator<= (const FixedArray< N, T1 > &a, const FixedArray< N, T2 > &b)
 Lexicographical less than or equal to comparison.
template<typename T1 , typename T2 , int N>
bool operator>= (const FixedArray< N, T1 > &a, const FixedArray< N, T2 > &b)
 Lexicographical greater than or equal to comparison.
template<int N, typename T >
std::ostream & operator<< (std::ostream &out, const FixedArray< N, T > &p)
 Write an array as space-separated numbers.
template<int N, typename T >
std::istream & operator>> (std::istream &in, FixedArray< N, T > &p)
 Read white space-separated numbers into an array.
template<int N, typename T >
void write_elements_binary (std::ostream &out, const FixedArray< N, T > &x)
 Write the array elements in binary format.
template<int N, typename T >
void read_elements_binary (std::istream &in, FixedArray< N, T > &x)
 Read the array elements in binary format.

Detailed Description

template<int N, typename T = double>
class FixedArray< N, T >

A fixed size array with size N and type T.

Parameters:
N is the size of the array. N must be positive.
T is the value type of the array. By default it is double.

This is an STL-compliant container. It is a model of a random access container with fixed size.

The array supports indexing and mathematical operations. The indices are in the range $ [0 .. N-1] $. This class does not have any virtual functions. The memory usage of the array is N times the size of the value type T.

Through partial template specialization, there are optimized versions of this class for N = 0, 1, 2 and 3.


Member Typedef Documentation

template<int N, typename T = double>
typedef Types::size_type FixedArray< N, 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.


Constructor & Destructor Documentation

template<int N, typename T = double>
FixedArray< N, T >::FixedArray ( parameter_type  x0,
parameter_type  x1 
)

Constructor. Specify the two components.

Precondition:
N == 2.
template<int N, typename T = double>
FixedArray< N, T >::FixedArray ( parameter_type  x0,
parameter_type  x1,
parameter_type  x2 
)

Constructor. Specify the three components.

Precondition:
N == 3.
template<int N, typename T = double>
FixedArray< N, T >::FixedArray ( parameter_type  x0,
parameter_type  x1,
parameter_type  x2,
parameter_type  x3 
)

Constructor. Specify the four components.

Precondition:
N == 4.
template<int N, typename T = double>
FixedArray< N, T >::FixedArray ( parameter_type  x0,
parameter_type  x1,
parameter_type  x2,
parameter_type  x3,
parameter_type  x4 
)

Constructor. Specify the five components.

Precondition:
N == 5.
template<int N, typename T = double>
FixedArray< N, T >::FixedArray ( parameter_type  x0,
parameter_type  x1,
parameter_type  x2,
parameter_type  x3,
parameter_type  x4,
parameter_type  x5 
)

Constructor. Specify the six components.

Precondition:
N == 6.
template<int N, typename T = double>
FixedArray< N, T >::FixedArray ( parameter_type  x0,
parameter_type  x1,
parameter_type  x2,
parameter_type  x3,
parameter_type  x4,
parameter_type  x5,
parameter_type  x6 
)

Constructor. Specify the seven components.

Precondition:
N == 7.
template<int N, typename T = double>
FixedArray< N, T >::FixedArray ( parameter_type  x0,
parameter_type  x1,
parameter_type  x2,
parameter_type  x3,
parameter_type  x4,
parameter_type  x5,
parameter_type  x6,
parameter_type  x7 
)

Constructor. Specify the eight components.

Precondition:
N == 8.

Member Function Documentation

template<int N, typename T = double>
template<typename EqualityComparable >
iterator FixedArray< N, T >::find ( const EqualityComparable &  x  )  [inline]

Linear search for x.

Same as

 std::find(begin(), end(), x) 

.

template<int N, typename T = double>
template<typename EqualityComparable >
const_iterator FixedArray< N, T >::find ( const EqualityComparable &  x  )  const [inline]
template<int N, typename T = double>
template<typename EqualityComparable >
int FixedArray< N, T >::find_index ( const EqualityComparable &  x  )  const [inline]

Linear search for x. Return the index of the matching element.

If the element is not in the array, return size().


Friends And Related Function Documentation

template<int N, typename T >
FixedArray< N, T > abs ( FixedArray< N, T >  x  )  [related]

Return the absolute value ($|x|$) applied to each array element.

References Array< N, T, A >::applyAbs().

template<int N, typename T >
FixedArray< N, T > acos ( FixedArray< N, T >  x  )  [related]

Return the inverse cosine ($ \cos^{-1}(x) $) appiled to each array element.

References Array< N, T, A >::applyAcos().

template<int N, typename T >
void applyAbs ( FixedArray< N, T > *  x  )  [related]

Apply the absolute value ($|x|$) to each array element.

References FixedArray< N, T >::begin(), and FixedArray< N, T >::end().

template<int N, typename T >
void applyAcos ( FixedArray< N, T > *  x  )  [related]

Apply the inverse cosine ($ \cos^{-1}(x) $) to each array element.

References FixedArray< N, T >::begin(), and FixedArray< N, T >::end().

template<int N, typename T >
void applyAsin ( FixedArray< N, T > *  x  )  [related]

Apply the inverse sine ($ \sin^{-1}(x) $) to each array element.

References FixedArray< N, T >::begin(), and FixedArray< N, T >::end().

template<int N, typename T >
void applyAtan ( FixedArray< N, T > *  x  )  [related]

Apply the inverse tangent ($ \tan^{-1}(x) $) to each array element.

References FixedArray< N, T >::begin(), and FixedArray< N, T >::end().

template<int N, typename T >
void applyCeil ( FixedArray< N, T > *  x  )  [related]

Apply the ceiling function ($ \lceil x \rceil $) to each array element.

References FixedArray< N, T >::begin(), and FixedArray< N, T >::end().

template<int N, typename T >
void applyCos ( FixedArray< N, T > *  x  )  [related]

Apply the cosine ($ \cos(x) $) to each array element.

References FixedArray< N, T >::begin(), and FixedArray< N, T >::end().

template<int N, typename T >
void applyCosh ( FixedArray< N, T > *  x  )  [related]

Apply the hyperbolic cosine ($ \cosh(x) $) to each array element.

References FixedArray< N, T >::begin(), and FixedArray< N, T >::end().

template<int N, typename T >
void applyExp ( FixedArray< N, T > *  x  )  [related]

Apply the exponential function ($ \mathrm{e}^x $) to each array element.

References FixedArray< N, T >::begin(), and FixedArray< N, T >::end().

template<int N, typename T >
void applyFloor ( FixedArray< N, T > *  x  )  [related]

Apply the floor function ($ \lfloor x \rfloor $) to each array element.

References FixedArray< N, T >::begin(), and FixedArray< N, T >::end().

template<int N, typename T >
void applyLog ( FixedArray< N, T > *  x  )  [related]

Apply the natural logarithm ($ \ln(x) $) to each array element.

References FixedArray< N, T >::begin(), and FixedArray< N, T >::end().

template<int N, typename T >
void applyLog10 ( FixedArray< N, T > *  x  )  [related]

Apply the logarithm base 10 ($ \log_{10}(x) $) to each array element.

References FixedArray< N, T >::begin(), and FixedArray< N, T >::end().

template<int N, typename T >
void applySin ( FixedArray< N, T > *  x  )  [related]

Apply the sine ($ \sin(x) $) to each array element.

References FixedArray< N, T >::begin(), and FixedArray< N, T >::end().

template<int N, typename T >
void applySinh ( FixedArray< N, T > *  x  )  [related]

Apply the hyperbolic sine ($ \sinh(x) $) to each array element.

References FixedArray< N, T >::begin(), and FixedArray< N, T >::end().

template<int N, typename T >
void applySqrt ( FixedArray< N, T > *  x  )  [related]

Apply the square root ($ \sqrt{x} $) to each array element.

References FixedArray< N, T >::begin(), and FixedArray< N, T >::end().

template<int N, typename T >
void applyTan ( FixedArray< N, T > *  x  )  [related]

Apply the tangent ($ \tan(x) $) to each array element.

References FixedArray< N, T >::begin(), and FixedArray< N, T >::end().

template<int N, typename T >
void applyTanh ( FixedArray< N, T > *  x  )  [related]

Apply the hyperbolic tangent ($ \tanh(x) $) to each array element.

References FixedArray< N, T >::begin(), and FixedArray< N, T >::end().

template<int N, typename T >
FixedArray< N, T > asin ( FixedArray< N, T >  x  )  [related]

Return the inverse sine ($ \sin^{-1}(x) $) applied to each array element.

References Array< N, T, A >::applyAsin().

template<int N, typename T >
FixedArray< N, T > atan ( FixedArray< N, T >  x  )  [related]

Return the inverse tangent ($ \tan^{-1}(x) $) applied to each array element.

References Array< N, T, A >::applyAtan().

template<int N, typename T >
FixedArray< N, T > ceil ( FixedArray< N, T >  x  )  [related]

Return the ceiling function ($ \lceil x \rceil $) applied to each array element.

References Array< N, T, A >::applyCeil().

template<int N, typename T >
FixedArray< N, T > computeMaximum ( const FixedArray< N, T > &  x,
const FixedArray< N, T > &  y 
) [related]

Return a FixedArray that is element-wise the maximum of the two.

References max().

template<int N, typename T >
T computeMaximum ( const FixedArray< N, T > &  x  )  [related]

Return the maximum component. Use > for comparison.

template<int N, typename T >
FixedArray< N, T > computeMinimum ( const FixedArray< N, T > &  x,
const FixedArray< N, T > &  y 
) [related]

Return a FixedArray that is element-wise the minimum of the two.

References min().

template<int N, typename T >
T computeMinimum ( const FixedArray< N, T > &  x  )  [related]

Return the minimum component. Use < for comparison.

template<int N, typename T >
T computeProduct ( const FixedArray< N, T > &  x  )  [related]

Return the product of the components.

template<int N, typename T >
T computeSum ( const FixedArray< N, T > &  x  )  [related]

Return the sum of the components.

template<int N, typename T >
FixedArray< N, T > cos ( FixedArray< N, T >  x  )  [related]

Return the cosine ($ \cos(x) $) applied to each array element.

References Array< N, T, A >::applyCos().

template<int N, typename T >
FixedArray< N, T > cosh ( FixedArray< N, T >  x  )  [related]

Return the hyperbolic cosine ($ \cosh(x) $) applied to each array element.

References Array< N, T, A >::applyCosh().

template<int N, typename T >
FixedArray< N, T > exp ( FixedArray< N, T >  x  )  [related]

Return the exponential function ($ \mathrm{e}^x $) applied to each array element.

References Array< N, T, A >::applyExp().

template<int N, typename T >
FixedArray< N, T > floor ( FixedArray< N, T >  x  )  [related]

Return the floor function ($ \lfloor x \rfloor $) applied to each array element.

References Array< N, T, A >::applyFloor().

template<int N, typename T >
FixedArray< N, T > log ( FixedArray< N, T >  x  )  [related]

Return the natural logarithm ($ \ln(x) $) applied to each array element.

References Array< N, T, A >::applyLog().

template<int N, typename T >
FixedArray< N, T > log10 ( FixedArray< N, T >  x  )  [related]

Return the logarithm base 10 ($ \log_{10}(x) $) applied to each array element.

References Array< N, T, A >::applyLog10().

template<typename T1 , typename T2 , int N>
bool operator!= ( const FixedArray< N, T1 > &  a,
const FixedArray< N, T2 > &  b 
) [related]

Return true if the arrays are not equal.

template<int N, typename T >
FixedArray< N, T > operator% ( const FixedArray< N, T > &  x,
const FixedArray< N, T > &  y 
) [related]

FixedArray-FixedArray modulus.

template<int N, typename T >
FixedArray< N, T > operator% ( const typename FixedArray< N, T >::parameter_type  value,
const FixedArray< N, T > &  x 
) [related]

Scalar-FixedArray modulus.

template<int N, typename T >
FixedArray< N, T > operator% ( const FixedArray< N, T > &  x,
const typename FixedArray< N, T >::parameter_type  value 
) [related]

FixedArray-scalar modulus.

template<int N, typename T >
FixedArray< N, T > operator* ( const FixedArray< N, T > &  x,
const FixedArray< N, T > &  y 
) [related]

FixedArray-FixedArray multiplication.

template<int N, typename T >
FixedArray< N, T > operator* ( const typename FixedArray< N, T >::parameter_type  value,
const FixedArray< N, T > &  x 
) [related]

Scalar-FixedArray multiplication.

template<int N, typename T >
FixedArray< N, T > operator* ( const FixedArray< N, T > &  x,
const typename FixedArray< N, T >::parameter_type  value 
) [related]

FixedArray-scalar multiplication.

template<int N, typename T >
FixedArray< N, T > operator+ ( const FixedArray< N, T > &  x,
const FixedArray< N, T > &  y 
) [related]

FixedArray-FixedArray addition.

template<int N, typename T >
FixedArray< N, T > operator+ ( const typename FixedArray< N, T >::parameter_type  value,
const FixedArray< N, T > &  x 
) [related]

Scalar-FixedArray addition.

template<int N, typename T >
FixedArray< N, T > operator+ ( const FixedArray< N, T > &  x,
const typename FixedArray< N, T >::parameter_type  value 
) [related]

FixedArray-scalar addition.

template<int N, typename T >
FixedArray< N, T > & operator+ ( FixedArray< N, T > &  x  )  [related]

Unary positive operator.

template<int N, typename T >
FixedArray< N, T > operator- ( const FixedArray< N, T > &  x,
const FixedArray< N, T > &  y 
) [related]

FixedArray-FixedArray subtraction.

template<int N, typename T >
FixedArray< N, T > operator- ( const typename FixedArray< N, T >::parameter_type  value,
const FixedArray< N, T > &  x 
) [related]

Scalar-FixedArray subtraction.

template<int N, typename T >
FixedArray< N, T > operator- ( const FixedArray< N, T > &  x,
const typename FixedArray< N, T >::parameter_type  value 
) [related]

FixedArray-scalar subtraction.

template<int N, typename T >
FixedArray< N, T > operator- ( const FixedArray< N, T > &  x  )  [related]

Unary negate operator.

References FixedArray< N, T >::negate().

template<int N, typename T >
FixedArray< N, T > operator/ ( const FixedArray< N, T > &  x,
const FixedArray< N, T > &  y 
) [related]

FixedArray-FixedArray division.

template<int N, typename T >
FixedArray< N, T > operator/ ( const typename FixedArray< N, T >::parameter_type  value,
const FixedArray< N, T > &  x 
) [related]

Scalar-FixedArray division.

template<int N, typename T >
FixedArray< N, T > operator/ ( const FixedArray< N, T > &  x,
const typename FixedArray< N, T >::parameter_type  value 
) [related]

FixedArray-scalar division.

template<typename T1 , typename T2 , int N>
bool operator< ( const FixedArray< N, T1 > &  a,
const FixedArray< N, T2 > &  b 
) [related]

Lexicographical less than comparison.

template<int N, typename T >
std::ostream & operator<< ( std::ostream &  out,
const FixedArray< N, T > &  p 
) [related]

Write an array as space-separated numbers.

template<typename T1 , typename T2 , int N>
bool operator<= ( const FixedArray< N, T1 > &  a,
const FixedArray< N, T2 > &  b 
) [related]

Lexicographical less than or equal to comparison.

template<typename T1 , typename T2 , int N>
bool operator== ( const FixedArray< N, T1 > &  a,
const FixedArray< N, T2 > &  b 
) [related]

Return true if the arrays are equal.

template<typename T1 , typename T2 , int N>
bool operator> ( const FixedArray< N, T1 > &  a,
const FixedArray< N, T2 > &  b 
) [related]

Lexicographical greater than comparison.

template<typename T1 , typename T2 , int N>
bool operator>= ( const FixedArray< N, T1 > &  a,
const FixedArray< N, T2 > &  b 
) [related]

Lexicographical greater than or equal to comparison.

template<int N, typename T >
std::istream & operator>> ( std::istream &  in,
FixedArray< N, T > &  p 
) [related]

Read white space-separated numbers into an array.

template<int N, typename T >
void read_elements_binary ( std::istream &  in,
FixedArray< N, T > &  x 
) [related]

Read the array elements in binary format.

template<int N, typename T >
FixedArray< N, T > sin ( FixedArray< N, T >  x  )  [related]

Return the sine ($ \sin(x) $) applied to each array element.

References Array< N, T, A >::applySin().

template<int N, typename T >
FixedArray< N, T > sinh ( FixedArray< N, T >  x  )  [related]

Return the hyperbolic sine ($ \sinh(x) $) applied to each array element.

References Array< N, T, A >::applySinh().

template<int N, typename T >
FixedArray< N, T > sqrt ( FixedArray< N, T >  x  )  [related]

Return the square root ($ \sqrt{x} $) applied to each array element.

References Array< N, T, A >::applySqrt().

template<int N, typename T >
FixedArray< N, T > tan ( FixedArray< N, T >  x  )  [related]

Return the tangent ($ \tan(x) $) applied to each array element.

References Array< N, T, A >::applyTan().

template<int N, typename T >
FixedArray< N, T > tanh ( FixedArray< N, T >  x  )  [related]

Return the hyperbolic tangent ($ \tanh(x) $) applied to each array element.

References Array< N, T, A >::applyTanh().

template<int N, typename T >
void write_elements_binary ( std::ostream &  out,
const FixedArray< N, T > &  x 
) [related]

Write the array elements in binary format.


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