gcc/libstdc++-v3/testsuite
Alexandre Oliva c787deb012 skip Cholesky decomposition in is>>n_mv_dist
normal_mv_distribution maintains the variance-covariance matrix param
in Cholesky-decomposed form.  Existing param_type constructors, when
taking a full or lower-triangle varcov matrix, perform Cholesky
decomposition to convert it to the internal representation.  This
internal representation is visible both in the varcov() result, and in
the streamed-out representation of a normal_mv_distribution object.

The problem is that when that representation is streamed back in, the
read-back decomposed varcov matrix is used as a lower-triangle
non-decomposed varcov matrix, and it undergoes Cholesky decomposition
again.  So, each cycle of stream-out/stream-in changes the varcov
matrix to its "square root", instead of restoring the original
params.

This patch includes Corentin's changes that introduce verification in
testsuite/ext/random/normal_mv_distribution/operators/serialize.cc and
other similar tests that the object read back in compares equal to the
written-out object: the modified tests pass only if (u == v).

This patch also fixes the error exposed by his change, introducing an
alternate private constructor for param_type, used only by operator>>.


for  libstdc++-v3/ChangeLog

	* include/ext/random
	(normal_mv_distribution::param_type::param_type): New private
	ctor taking a decomposed varcov matrix, for use by...
	(operator>>): ... this, befriended.
	* include/ext/random.tcc (operator>>): Use it.
	(normal_mv_distribution::param_type::_M_init_lower): Adjust
	member function name in exception message.

for  libstdc++-v3/ChangeLog
from  Corentin Gay  <gay@adacore.com>

	* testsuite/ext/random/beta_distribution/operators/serialize.cc,
	testsuite/ext/random/hypergeometric_distribution/operators/serialize.cc,
	testsuite/ext/random/normal_mv_distribution/operators/serialize.cc,
	testsuite/ext/random/triangular_distribution/operators/serialize.cc,
	testsuite/ext/random/von_mises_distribution/operators/serialize.cc:
	Add call to `VERIFY`.

From-SVN: r274233
2019-08-09 09:20:58 +00:00
..
17_intro Fix failing tests for use of non-reserved names 2019-05-20 15:38:21 +01:00
18_support PR libstdc++/51333 Define recursive_init_error constructor non-inline 2019-07-29 15:27:19 +01:00
19_diagnostics
20_util P1651R0 bind_front should not unwrap reference_wrapper 2019-08-06 16:57:55 +01:00
21_strings Replace std::to_string for integers with optimized version 2019-06-12 15:52:02 +01:00
22_locale
23_containers P0325R4 to_array from LFTS with updates 2019-08-08 11:18:53 +01:00
24_iterators Fix non-standard behaviour of std::istream_iterator 2019-06-19 23:57:10 +01:00
25_algorithms Implement C++20 p0202 - Add Constexpr Modifiers to Functions in <algorithm> and <utility> Headers. 2019-08-01 15:25:42 +00:00
26_numerics Specialize std::numbers constants for __float128 2019-08-06 16:57:51 +01:00
27_io PR libstdc++/91067 fix missing exports for filesystem iterators 2019-07-03 22:06:25 +01:00
28_regex
29_atomics Fix inaccurate comment in new test 2019-07-12 16:45:16 +01:00
30_threads LWG 2921 remove packaged_task constructors taking allocators 2019-05-23 22:40:56 +01:00
abi
backward
config
data
decimal
experimental PR libstdc++/90281 Fix string conversions for filesystem::path 2019-06-17 15:19:04 +01:00
ext skip Cholesky decomposition in is>>n_mv_dist 2019-08-09 09:20:58 +00:00
lib PR libstdc++/90252 fix effective-target check for TBB 2019-05-21 14:50:41 +01:00
libstdc++-abi
libstdc++-dg
libstdc++-prettyprinters Improve tests for std::vector<bool> printer 2019-06-20 10:04:55 +01:00
libstdc++-xmethods
performance
special_functions
tr1
tr2
util 2019-07-26 François Dumont <fdumont@gcc.gnu.org> 2019-07-26 05:05:48 +00:00
Makefile.am Remove Profile Mode, deprecated since GCC 7.1 2019-05-13 11:50:21 +01:00
Makefile.in Remove Profile Mode, deprecated since GCC 7.1 2019-05-13 11:50:21 +01:00