LexicographicalView Class Template Reference

#include <ql/Math/lexicographicalview.hpp>

List of all members.


Detailed Description

template<class RandomAccessIterator>
class QuantLib::LexicographicalView< RandomAccessIterator >

Lexicographical 2-D view of a contiguous set of data.

This view can be used to easily store a discretized 2-D function in an array to be used in a finite differences calculation.


Public Types

typedef RandomAccessIterator x_iterator
 iterates over $ v_{ij} $ with $ j $ fixed.

typedef stepping_iterator<
RandomAccessIterator > 
y_iterator
 iterates over $ v_{ij} $ with $ i $ fixed.


Public Member Functions

 LexicographicalView (const RandomAccessIterator &begin, const RandomAccessIterator &end, Size xSize)
 attaches the view with the given dimension to a sequence

typedef QL_REVERSE_ITERATOR (RandomAccessIterator, typename 1< RandomAccessIterator >::value_type) reverse_x_iterator
 iterates backwards over $ v_{ij} $ with $ j $ fixed.

typedef QL_REVERSE_ITERATOR (y_iterator, typename 1< RandomAccessIterator >::value_type) reverse_y_iterator
 iterates backwards over $ v_{ij} $ with $ i $ fixed.

Element access
y_iterator operator[] (Size i)
Iterator access
x_iterator xbegin (Size j)
x_iterator xend (Size j)
reverse_x_iterator rxbegin (Size j)
reverse_x_iterator rxend (Size j)
y_iterator ybegin (Size i)
y_iterator yend (Size i)
reverse_y_iterator rybegin (Size i)
reverse_y_iterator ryend (Size i)
Inspectors
Size xSize () const
 dimension of the array along x

Size ySize () const
 dimension of the array along y


QuantLib.org
QuantLib
Hosted by
SourceForge.net Logo
Documentation generated by
doxygen