Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

Array1D< S > Class Template Reference

#include <Array.h>

List of all members.


Detailed Description

template<typename S>
class Array1D< S >

Lightweight array in dimension 1.

Parameters:
S type of array elements.

Definition at line 155 of file Array.h.

Public Member Functions

int getIndexBase () const
void setIndexBase (int base)
int getDimension () const
void setDimension (int q)
S * getData () const
 Array1D (int n_, int b_=0)
 Array1D (const Array1D &x)
 ~Array1D ()
const S & operator[] (int i) const
S & operator[] (int i)
Array1D< S > & operator= (const Array1D< S > &B)
Real norm () const
Array1D & scale (S f)
dotProduct (Array1D< S > &X) const
std::ostream & printSelf (std::ostream &os) const

Protected Attributes

int b
int n
S * dptr


Constructor & Destructor Documentation

template<typename S>
Array1D< S >::Array1D int    n_,
int    b_ = 0
[inline, explicit]
 

Parameters:
n_ number of array elements.
b_ index base.

Definition at line 194 of file Array.h.

template<typename S>
Array1D< S >::Array1D const Array1D< S > &    x [inline]
 

Definition at line 202 of file Array.h.

template<typename S>
Array1D< S >::~Array1D   [inline]
 

Definition at line 212 of file Array.h.


Member Function Documentation

template<typename S>
int Array1D< S >::getIndexBase   const [inline]
 

Index base.

Definition at line 175 of file Array.h.

Referenced by Array1D< const UTRRealMatrix * >::operator=().

template<typename S>
void Array1D< S >::setIndexBase int    base [inline]
 

Definition at line 177 of file Array.h.

template<typename S>
int Array1D< S >::getDimension   const [inline]
 

Number of array elements.

Definition at line 180 of file Array.h.

Referenced by Pricing::latticeForwardPrice(), and Lattice< StandardBrownianNode >::selfTest().

template<typename S>
void Array1D< S >::setDimension int    q [inline]
 

Resets dimension, NO EFFECT ON MEMORY.

Definition at line 183 of file Array.h.

template<typename S>
S* Array1D< S >::getData   const [inline]
 

Pointer to data array

Definition at line 186 of file Array.h.

Referenced by Array1D< const UTRRealMatrix * >::operator=().

template<typename S>
const S& Array1D< S >::operator[] int    i const [inline]
 

Subscripting.

Definition at line 215 of file Array.h.

template<typename S>
S& Array1D< S >::operator[] int    i [inline]
 

Subscripting.

Definition at line 225 of file Array.h.

template<typename S>
Array1D<S>& Array1D< S >::operator= const Array1D< S > &    B [inline]
 

Copies the elements of b which must be of the same length as a (not checked).

Definition at line 237 of file Array.h.

template<typename S>
Real Array1D< S >::norm   const [inline]
 

Euclidean norm.

Definition at line 249 of file Array.h.

template<typename S>
Array1D& Array1D< S >::scale   f [inline]
 

Multiplication by a scalar, returns scaled array.

Definition at line 257 of file Array.h.

template<typename S>
S Array1D< S >::dotProduct Array1D< S > &    X const [inline]
 

Dot product with the array X of the same length. Lengths are not checked.

Definition at line 266 of file Array.h.

template<typename S>
std::ostream& Array1D< S >::printSelf std::ostream &    os const [inline]
 

Definition at line 276 of file Array.h.


Member Data Documentation

template<typename S>
int Array1D< S >::b [protected]
 

Index base.

Definition at line 160 of file Array.h.

template<typename S>
int Array1D< S >::n [protected]
 

Number of elements.

Definition at line 162 of file Array.h.

template<typename S>
S* Array1D< S >::dptr [protected]
 

Data array.

Definition at line 165 of file Array.h.


The documentation for this class was generated from the following file:
Generated on Mon Sep 22 02:16:32 2003 for Libor-Library by doxygen1.3-rc3