lite::plane< dim_ > Class Template Reference
[Array Transformations]

This transform, when applied to an array of dimension N, returns a reference array of dimension N-1 by fixing the index at dimension dim_. More...

#include <array.hpp>

List of all members.

Public Member Functions

LITE_INLINE plane (int index=0)
 Creates a plane that fixes the index at dimension dim_ to index.
LITE_INLINE plane (const plane &other)
LITE_INLINE planeoperator= (const plane &other)

Public Attributes

int index
 The index at dimension dim_.

Detailed Description

template<int dim_>
class lite::plane< dim_ >

This transform, when applied to an array of dimension N, returns a reference array of dimension N-1 by fixing the index at dimension dim_.

Note that dimensions are numbered starting from 0.

Example:
        array<float[3][4][5]> a;    // a 3x4x5 array

        a[plane<1>(2)] = -1;       // left hand side is a 3x5 reference array 

        // the above line is equivalent to:

        for (int i=0; i<a.size().i0; i++)
            for (int k=0; k<a.size().i2; k++)
                a(i, 2, k) = -1;

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Defines

Generated on Fri Nov 6 02:03:21 2009 for Lite by  doxygen 1.6.0