Hello everyone,
I have defined the following type to store the parameters of a single multidimensional Gaussian
type, public :: gaussian_param
! mean
real, dimension(dim) :: x
! covariance matrix
real, dimension(dim, dim) :: C
end type gaussian_param
How best to extend this for the case of a set of Gaussians with different mean and covariance matrices? One approach would be to declare an array of the new type(gaussian_param).
But I would like to instead keep the means and covariances in the same type, along the lines of
type, public :: gaussian_param
! mean
real, dimension(dim, :) :: x
! covariance matrix
real, dimension(dim, dim, :) :: C
end type gaussian_param
where the number of Gaussians is known at runtime