Diffpack Documentation


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

CorrAlongLine Class Reference

covariance of two random fields along a line. More...

#include <CorrAlongLine.h>

Inheritance diagram for CorrAlongLine::

EmpiricalStatistics List of all members.

Public Methods

 CorrAlongLine ()
 ~CorrAlongLine ()
void init ()
void update (Field &u1, Field &u2)
void dump (CurvePlotFile &plot_manager, Field &Eu1, Field &Eu2)
const VecSimple(Ptv(real))& getPoints ()
void scan (Is is)
void scan (Ptv(real) &main_point, Ptv(real) &line_start, Ptv(real) &line_stop, int npoints_along_line, const String &name)

Detailed Description

covariance of two random fields along a line.

NAME: CorrAlongLine - covariance of two random fields along a line

DESCRIPTION:

The complete covariance of two random fields requires heavy computations and storage in addition to being challenging to visualize. However, if one restricts the attention to the covariance of a field at one point and another field at an arbitrary point along a line, the result is a one-dimensional curve, which is quite fast to compute, store and visualize. The current class collects samples of two random fields and estimates the covariance along a line. One can, of course, compute the covariance of point valies of two different random fields or the covariance of point values a single field.


Constructor & Destructor Documentation

CorrAlongLine::CorrAlongLine ( ) [inline]
 

The constructor is empty so initialization must be performed by calling the "scan" function to set data for the line in question and the "init" function for initializing the internal collector of empirical statistics.

CorrAlongLine::~CorrAlongLine ( ) [inline]
 


Member Function Documentation

void CorrAlongLine::dump ( CurvePlotFile & plot_manager,
Field & Eu1,
Field & Eu2 )
 

calls "estimate" and then dumps the computed covariances as a "CurvePlot" curve. The curve is added to a curve database "CurvePlotFile", provided as first argument to the function. The other two arguments are the expectations of the two random fields involved in the covariance expression.

const VecSimple(Ptv(real)) & CorrAlongLine::getPoints ( ) [inline]
 

returns access to a vector containing the discrete points along the specified line where the covariances are computed.

void CorrAlongLine::init ( )
 

initializes the collector of empirical statistics. Must be called prior to the computation of a new empirical covariance.

Reimplemented from EmpiricalStatistics.

void CorrAlongLine::scan ( Ptv(real) & main_point,
Ptv(real) & line_start,
Ptv(real) & line_stop,
int npoints_along_line,
const String & name )
 

See documentation of one of the overloaded functions.

void CorrAlongLine::scan ( Is is )
 

reads input data for initializing the the line, along which we want to compute the covariances. The "scan" function that takes a general input source as argument, expects an initialization string with the following syntax:

   d=2 main_point=(5.3,1) start=(1.2,9) stop=(3,0) npoints=10 name=u-corr
First comes a specification of the number of space dimensions, here 2 ("d=2"). Then comes the specification of the point where the first field in the covariance is kept fixed. The next two points define the start and end of a line. Notice that one (normally) wants the "main_point" point to lie on the line between "start" and "stop". The covariance is computed at discrete points along the line, controlled by a resolution parameter that is set to 10 in the current example. Finally, we prescribe a name for this empirical statistics.

An overloaded "scan" function takes the described parameters as arguments to the function.

void CorrAlongLine::update ( Field & u1,
Field & u2 )
 

updates the empirical statistics for the covariance along the line. To be called every time one has a new reandom sample of the two fields. Inside "update", the field "u2" is interpolated at the discrete points along the line, while "u1" is evaluated at a fixed point (the "main_point" parameter specified when calling "scan").


The documentation for this class was generated from the following file:
Copyright © 2003 inuTech GmbH. All rights reserved.