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:
@@ -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 {
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user