MultivariateAccumulator Class Reference

#include <multivariateaccumulator.hpp>

List of all members.


Detailed Description

A sample accumulator for multivariate analysis.

MultivariateAccumulator can accumulate vector-type samples and return the average vector, both in Array form and std::vector<double> form, and the covariance matrix

Deprecated:
use SequenceStatistics instead


Public Member Functions

 MultivariateAccumulator (Size size)
Inspectors
Size size () const
 size of each sample

Size samples () const
 number of samples collected

double weightSum () const
 sum of data weights

Disposable< Arraymean () const
 returns the mean as an Array

std::vector< double > meanVector () const
 returns the mean as a std::vector<double>

Matrix covariance () const
 returns the covariance Matrix

Matrix correlation () const
 returns the correlation Matrix

Modifiers
void add (const Array &arr, double weight=1.0)
 adds an Array to the collection, possibly with a weight

void add (const std::vector< double > &vec, double weight=1.0)
 adds a vector<double> to the collection, possibly with a weight

template<class DataIterator> void addSequence (DataIterator begin, DataIterator end)
 adds a sequence of data to the collection

template<class DataIterator, class WeightIterator> void addSequence (DataIterator begin, DataIterator end, WeightIterator wbegin)
 adds a sequence of data to the collection, each with its weight

void reset ()
 resets the data to a null set


The documentation for this class was generated from the following files:

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