#include <CorrAlongLine.h>
Inheritance diagram for CorrAlongLine::

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) |
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.
|
|
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. |
|
|
|
|
|
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. |
|
|
returns access to a vector containing the discrete points along the specified line where the covariances are computed. |
|
|
initializes the collector of empirical statistics. Must be called prior to the computation of a new empirical covariance. Reimplemented from EmpiricalStatistics. |
|
|
See documentation of one of the overloaded functions. |
|
|
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 An overloaded "scan" function takes the described parameters as arguments to the function. |
|
|
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"). |