QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.38
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Path Class Reference

single-factor random walk More...

#include <path.hpp>

+ Collaboration diagram for Path:

Public Member Functions

 Path (TimeGrid timeGrid, Array values=Array())
 
inspectors
bool empty () const
 
Size length () const
 
Real operator[] (Size i) const
 asset value at the \( i \)-th point More...
 
Real at (Size i) const
 
Real & operator[] (Size i)
 
Real & at (Size i)
 
Real value (Size i) const
 
Real & value (Size i)
 
Time time (Size i) const
 time at the \( i \)-th point More...
 
Real front () const
 initial asset value More...
 
Real & front ()
 
Real back () const
 final asset value More...
 
Real & back ()
 
const TimeGrid & timeGrid () const
 time grid More...
 

iterators

typedef Array::const_iterator iterator
 
typedef Array::const_reverse_iterator reverse_iterator
 
TimeGrid timeGrid_
 
Array values_
 
iterator begin () const
 
iterator end () const
 
reverse_iterator rbegin () const
 
reverse_iterator rend () const
 

Detailed Description

single-factor random walk

Note
the path includes the initial asset value as its first point.
Examples
DiscreteHedging.cpp.

Definition at line 40 of file path.hpp.

Member Typedef Documentation

◆ iterator

Definition at line 67 of file path.hpp.

◆ reverse_iterator

Definition at line 68 of file path.hpp.

Constructor & Destructor Documentation

◆ Path()

Path ( TimeGrid  timeGrid,
Array  values = Array() 
)

Definition at line 82 of file path.hpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ empty()

bool empty ( ) const

Definition at line 90 of file path.hpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ length()

Size length ( ) const
Examples
DiscreteHedging.cpp.

Definition at line 94 of file path.hpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator[]() [1/2]

Real operator[] ( Size  i) const

asset value at the \( i \)-th point

Definition at line 98 of file path.hpp.

◆ at() [1/2]

Real at ( Size  i) const

Definition at line 102 of file path.hpp.

+ Here is the call graph for this function:

◆ operator[]() [2/2]

Real & operator[] ( Size  i)

Definition at line 106 of file path.hpp.

◆ at() [2/2]

Real & at ( Size  i)

Definition at line 110 of file path.hpp.

+ Here is the call graph for this function:

◆ value() [1/2]

Real value ( Size  i) const

Definition at line 114 of file path.hpp.

+ Here is the caller graph for this function:

◆ value() [2/2]

Real & value ( Size  i)

Definition at line 118 of file path.hpp.

◆ time()

Time time ( Size  i) const

time at the \( i \)-th point

Definition at line 138 of file path.hpp.

◆ front() [1/2]

Real front ( ) const

initial asset value

Examples
DiscreteHedging.cpp.

Definition at line 122 of file path.hpp.

+ Here is the caller graph for this function:

◆ front() [2/2]

Real & front ( )

Definition at line 126 of file path.hpp.

◆ back() [1/2]

Real back ( ) const

final asset value

Definition at line 130 of file path.hpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ back() [2/2]

Real & back ( )

Definition at line 134 of file path.hpp.

+ Here is the call graph for this function:

◆ timeGrid()

const TimeGrid & timeGrid ( ) const

time grid

Definition at line 142 of file path.hpp.

+ Here is the caller graph for this function:

◆ begin()

Path::iterator begin ( ) const

Definition at line 146 of file path.hpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ end()

Path::iterator end ( ) const

Definition at line 150 of file path.hpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rbegin()

Path::reverse_iterator rbegin ( ) const

Definition at line 154 of file path.hpp.

+ Here is the call graph for this function:

◆ rend()

Path::reverse_iterator rend ( ) const

Definition at line 158 of file path.hpp.

+ Here is the call graph for this function:

Member Data Documentation

◆ timeGrid_

TimeGrid timeGrid_
private

Definition at line 75 of file path.hpp.

◆ values_

Array values_
private

Definition at line 76 of file path.hpp.