VISH  0.2
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | Friends
Eagle::FixedArray Class Reference

A FixedArray is a simple copy-by-value array providing random access to its elements. More...

#include </home/werner/origo/vish/ocean/eagle/FixedArray.hpp>

List of all members.

Classes

Public Types

Public Member Functions

Static Public Member Functions

Protected Attributes

Friends


Detailed Description

A FixedArray is a simple copy-by-value array providing random access to its elements.

Its purpose is to implement small, light-weight types such as 3-vectors, 3x3 matrices and similar, useful for small efficient numerical operations, as they don't have an new/delete memory allocation overhead. The FixedArray does not provide operations on its elements - use class Vector for this purpose.

Copying or creating temporary FixedArray objects should be avoided, as the entire data fields are copied.

See also:
Vector

Member Function Documentation

template<typename T , typename ConversionFunctor >
static FixedArray Eagle::FixedArray::convert ( const FixedArray< T, N > &  F,
const ConversionFunctor &  CF 
) [inline, static]

Perform a type conversion on a given fixed array into another basis type:

           FixedArray<double, 3> data;
           FixedArray<int,3> idata = FixedArray<int, 3>::convert( data );

This is implemented as a type-safe static member function, thus allows explicit type conversion when calling polymorphic or template functions.

template<int subsize, int offset>
const FixedArray<value, subsize>* Eagle::FixedArray::get_subarray ( ) const [inline]

Same functionality as the subarray template member class, but simpler interface.

Example:

	const FixedArray<3 , CoordinateType>*P3D;
	const FixedArray<2 , CoordinateType>*P2D;
		P2D = P3D->get_subarray<2,0>();
	
template<typename T >
bool Eagle::FixedArray::operator!= ( const FixedArray< T, N > &  F) const [inline]

Compare two arrays.

The types might differ, but the length must be identical. The comparision loop is terminated at the first type mismatch.

template<typename T >
bool Eagle::FixedArray::operator== ( const FixedArray< T, N > &  F) const [inline]

Compare two arrays.

The types might differ, but the length must be identical. The comparision loop is terminated at the first type mismatch.

void Eagle::FixedArray::setFromArray ( const value *  x,
int  length = SIZE,
int  offset = 0 
) [inline]

Set all array elements to an array's element value.

Note that the array must have at least the same length as the FixedArray.


Friends And Related Function Documentation

template<typename T >
bool isEqual ( const FixedArray< value, N > &  L,
const FixedArray< T, N > &  R,
double  precision 
) [friend]

Compare two arrays with limited precision.

The types might differ, but the length must be identical. The comparision loop is terminated at the first type mismatch.


The documentation for this class was generated from the following file: