As it separately initialises the linked covariance and mean classes, it generates all the data twice, which is inefficient and slow. Passing pointers to the Model covariance and linear predictor classes does not seem to be memory safe. Best option is to improve the copy constructor to minimise calculations and pass the pointer as an argument from the covariance and mean classes.
As it separately initialises the linked covariance and mean classes, it generates all the data twice, which is inefficient and slow. Passing pointers to the Model covariance and linear predictor classes does not seem to be memory safe. Best option is to improve the copy constructor to minimise calculations and pass the pointer as an argument from the covariance and mean classes.