Index: trunk/npstat/stat/randomTukeyDepth.hh =================================================================== --- trunk/npstat/stat/randomTukeyDepth.hh (revision 901) +++ trunk/npstat/stat/randomTukeyDepth.hh (revision 902) @@ -1,79 +1,89 @@ #ifndef NPSTAT_RANDOMTUKEYDEPTH_HH_ #define NPSTAT_RANDOMTUKEYDEPTH_HH_ +/*! +// \file randomTukeyDepth.hh +// +// \brief Implementation of Tukey depth using random directions +// +// Author: I. Volobouev +// +// March 2023 +*/ + #include "npstat/nm/Matrix.hh" #include "npstat/rng/AbsRandomGenerator.hh" namespace npstat { /** // Random Tukey depth calculated within the sample. // Function arguments are as follows: // // sample should be dimensioned n x d, where d is the // point dimensionality and n is the sample size. // // rng random number generator in 1 or d dimensions. // // covmat should be dimensioned d x d. The random directions // will be generated by a multivariate normal // distribution with this covariance matrix. // // nRandom is the number of random directions to generate. // In addition to random directions, the ordering // will also be perfomed according to the marginals. // // depth this array will be filled with depth values // on exit (in the same order of points as in // the "sample" argument). // // nDepth is the length of the "depth" array. Should be // at least as large as the sample size. */ template void randomTukeyDepth1(const Matrix& sample, AbsRandomGenerator& rng, const Matrix& covmat, unsigned nRandom, double* depth, unsigned nDepth); /** // Random Tukey depth for each point in a sample calculated // using another (reference) sample. Function arguments are // as follows: // // sample should be dimensioned n x d, where d is the // point dimensionality and n is the sample size. // // refSample the depth of each point in the "sample" // argument will be defined with respect // to this sample. // // rng random number generator in 1 or d dimensions. // // covmat should be dimensioned d x d. The random directions // will be generated by a multivariate normal // distribution with this covariance matrix. // // nRandom is the number of random directions to generate. // In addition to random directions, the ordering // will also be perfomed according to the marginals. // // depth this array will be filled with depth values // on exit (in the same order of points as in // the "sample" argument). // // nDepth is the length of the "depth" array. Should be // at least as large as the "sample" size. */ template void randomTukeyDepth2(const Matrix& sample, const Matrix& refSample, AbsRandomGenerator& rng, const Matrix& covmat, unsigned nRandom, double* depth, unsigned nDepth); } #include "npstat/stat/randomTukeyDepth.icc" #endif // NPSTAT_RANDOMTUKEYDEPTH_HH_