Skip to content

shapeworks::MultiVariateNormalRandom

Public Functions

Name
MultiVariateNormalRandom(Eigen::MatrixXd const & covar)
MultiVariateNormalRandom(Eigen::VectorXd const & mean, Eigen::MatrixXd const & covar)
Eigen::MatrixXd operator()()
Eigen::MatrixXd sample(int count)

Public Attributes

Name
Eigen::VectorXd mean
Eigen::MatrixXd transform
boost::mt19937 gen
boost::normal_distribution dist

Public Functions Documentation

function MultiVariateNormalRandom

inline MultiVariateNormalRandom(
    Eigen::MatrixXd const & covar
)

function MultiVariateNormalRandom

inline MultiVariateNormalRandom(
    Eigen::VectorXd const & mean,
    Eigen::MatrixXd const & covar
)

function operator()

inline Eigen::MatrixXd operator()()

function sample

inline Eigen::MatrixXd sample(
    int count
)

Draw count samples as columns. This draws the same random numbers in the same order as count calls to operator(), but uses a single sparse product. For a diagonal covariance the transform is a scaled permutation, so skipping its exact zeros gives the same values as the dense product, much faster.

Public Attributes Documentation

variable mean

Eigen::VectorXd mean;

variable transform

Eigen::MatrixXd transform;

variable gen

boost::mt19937 gen {42};

variable dist

boost::normal_distribution dist;

Updated on 2026-11-20 at 17:28:41 +0000