gcc/libstdc++-v3/testsuite/ext
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
..
bitmap_allocator Extend DCE to remove unnecessary new/delete-pairs (PR c++/23383). 2019-07-25 09:36:38 +00:00
char8_t Fix tests that fail with -std=gnu++98 or -std=gnu++11 2019-06-06 13:13:42 +01:00
codecvt Update copyright years. 2019-01-01 13:31:55 +01:00
concurrence_lock_error Update copyright years. 2019-01-01 13:31:55 +01:00
concurrence_unlock_error Update copyright years. 2019-01-01 13:31:55 +01:00
debug_allocator Update copyright years. 2019-01-01 13:31:55 +01:00
enc_filebuf Remove obsolete Solaris 10 support 2019-05-14 17:17:23 +00:00
ext_pointer Update copyright years. 2019-01-01 13:31:55 +01:00
forced_error Update copyright years. 2019-01-01 13:31:55 +01:00
iota Update copyright years. 2019-01-01 13:31:55 +01:00
is_heap Update copyright years. 2019-01-01 13:31:55 +01:00
is_sorted Update copyright years. 2019-01-01 13:31:55 +01:00
malloc_allocator Update copyright years. 2019-01-01 13:31:55 +01:00
mt_allocator Update copyright years. 2019-01-01 13:31:55 +01:00
new_allocator Extend DCE to remove unnecessary new/delete-pairs (PR c++/23383). 2019-07-25 09:36:38 +00:00
numeric_traits Update copyright years. 2019-01-01 13:31:55 +01:00
pb_ds Update copyright years. 2019-01-01 13:31:55 +01:00
pool_allocator Fix tests that fail in C++2a mode 2019-01-29 00:47:32 +00:00
random skip Cholesky decomposition in is>>n_mv_dist 2019-08-09 09:20:58 +00:00
rope Update copyright years. 2019-01-01 13:31:55 +01:00
shared_ptr Update copyright years. 2019-01-01 13:31:55 +01:00
slist Update copyright years. 2019-01-01 13:31:55 +01:00
special_functions Update copyright years. 2019-01-01 13:31:55 +01:00
stdio_filebuf Update copyright years. 2019-01-01 13:31:55 +01:00
stdio_sync_filebuf Update copyright years. 2019-01-01 13:31:55 +01:00
throw_allocator Remove Profile Mode, deprecated since GCC 7.1 2019-05-13 11:50:21 +01:00
throw_value Update copyright years. 2019-01-01 13:31:55 +01:00
type_traits Update copyright years. 2019-01-01 13:31:55 +01:00
vstring Update copyright years. 2019-01-01 13:31:55 +01:00
concept_checks.cc Update copyright years. 2019-01-01 13:31:55 +01:00
headers.cc Remove array_allocator extension, deprecated since 4.9.0 2019-05-13 11:49:58 +01:00
median.cc Update copyright years. 2019-01-01 13:31:55 +01:00
pod_char_traits.cc Update copyright years. 2019-01-01 13:31:55 +01:00