Table of Contents

NAME

QccDatasetMeanVector, QccDatasetCovarianceMatrix - calculate first- and second-order statistics of dataset

SYNOPSIS

#include "libQccPack.h"

int QccDatasetMeanVector(const QccDataset *dataset, QccVector mean);

int QccDatasetCovarianceMatrix(const QccDataset *dataset, QccMatrix covariance);

DESCRIPTION

QccDatasetMeanVector() and QccDatasetCovarianceMatrix() calculate the mean and covariance, respectively, of dataset.

QccDatasetMeanVector() returns mean, a vector of dimension dataset->vector_dimension that is the average of all the vectors contained in dataset.

QccDatasetCovarianceMatrix() returns covariance, a matrix of dimension dataset->vector_dimension by dataset->vector_dimension that is the covariance matrix of dataset. Each vector of dataset is considered to be an observation of some random vector process; covariance is then the covariance matrix of that random vector process.

For datasets being accessed via block-based access, QccDatasetMeanVector() and QccDatasetCovarianceMatrix() calculate the mean and covariance matrix, respectively, of the current block of the dataset, rather than of the whole file.

Both mean and covariance must be allocated prior to calling QccDatasetMeanVector() or QccDatasetCovarianceMatrix() respectively.

RETURN VALUE

On success, 0 is returned. On error, 1 is returned.

SEE ALSO

QccDataset(3) , QccPack(3)

AUTHOR

Copyright (C) 1997-2021 James E. Fowler


Table of Contents



Get QccPack at SourceForge.net. Fast, secure and Free Open Source software downloads