2
0
mirror of https://github.com/boostorg/ublas.git synced 2026-02-19 14:52:17 +00:00

test the value of default construction. Either empty or full size (bounded_array)

[SVN r24865]
This commit is contained in:
Michael Stevens
2004-09-02 11:46:31 +00:00
parent e341edd30e
commit 417ac7712b
2 changed files with 14 additions and 0 deletions

View File

@@ -37,6 +37,10 @@ struct test_my_vector {
size_type i;
real_type n;
// Default Construct
VP default_constuct;
std::cout << "default construct = " << default_constuct << std::endl;
// Copy and swap
initialize_vector (v1);
initialize_vector (v2);
@@ -112,6 +116,12 @@ struct test_my_vector {
initialize_vector (v2);
t = ublas::inner_prod (v1, v2);
std::cout << "inner_prod (v1, v2) = " << t << std::endl;
// Scalar and Binary vector expression resulting in a vector
initialize_vector (v1);
initialize_vector (v2);
v1 = v1 * ublas::inner_prod (v1, v2);
std::cout << "v1 * inner_prod (v1, v2) = " << v1 << std::endl;
}
}
void operator () () const {

View File

@@ -33,6 +33,10 @@ struct test_my_matrix {
{
value_type t;
// Default Construct
MP default_constuct;
std::cout << "default construct = " << default_constuct << std::endl;
// Copy and swap
initialize_matrix (m1);
initialize_matrix (m2);