Lines Matching full:v1
28 void test_with(VP& v1, VP& v2, VP& v3) const in test_with()
39 initialize_vector(v1); in test_with()
41 v1 = v2; in test_with()
42 std::cout << "v1 = v2 = " << v1 << std::endl; in test_with()
43 v1.assign_temporary(v2); in test_with()
44 std::cout << "v1.assign_temporary (v2) = " << v1 << std::endl; in test_with()
45 v1.swap(v2); in test_with()
46 std::cout << "v1.swap (v2) = " << v1 << " " << v2 << std::endl; in test_with()
49 v1 = ublas::zero_vector<>(v1.size()); in test_with()
50 std::cout << "v1.zero_vector = " << v1 << std::endl; in test_with()
51 v1 = v2; in test_with()
55 initialize_vector(v1); in test_with()
57 project(v1, ublas::range(0, 1)) = project(v2, ublas::range(0, 1)); in test_with()
58 project(v1, ublas::range(0, 1)) = project(v2, ublas::slice(0, 1, 1)); in test_with()
59 project(v1, ublas::slice(2, -1, 2)) = project(v2, ublas::slice(0, 1, 2)); in test_with()
60 project(v1, ublas::slice(2, -1, 2)) = project(v2, ublas::range(0, 2)); in test_with()
61 std::cout << "v1 = range/slice " << v1 << std::endl; in test_with()
65 initialize_vector(v1); in test_with()
66 v2 = -v1; in test_with()
67 std::cout << "- v1 = " << v2 << std::endl; in test_with()
68 v2 = ublas::conj(v1); in test_with()
69 std::cout << "conj (v1) = " << v2 << std::endl; in test_with()
72 initialize_vector(v1); in test_with()
75 v3 = v1 + v2; in test_with()
76 std::cout << "v1 + v2 = " << v3 << std::endl; in test_with()
78 v3 = v1 - v2; in test_with()
79 std::cout << "v1 - v2 = " << v3 << std::endl; in test_with()
83 initialize_vector(v1); in test_with()
84 v2 = value_type(1.) * v1; in test_with()
85 std::cout << "1. * v1 = " << v2 << std::endl; in test_with()
86 v2 = t * v1; in test_with()
87 std::cout << "N * v1 = " << v2 << std::endl; in test_with()
88 initialize_vector(v1); in test_with()
89 v2 = v1 * value_type(1.); in test_with()
90 std::cout << "v1 * 1. = " << v2 << std::endl; in test_with()
91 v2 = v1 * t; in test_with()
92 std::cout << "v1 * N = " << v2 << std::endl; in test_with()
95 initialize_vector(v1); in test_with()
97 v2 += v1; in test_with()
98 std::cout << "v2 += v1 = " << v2 << std::endl; in test_with()
99 v2 -= v1; in test_with()
100 std::cout << "v2 -= v1 = " << v2 << std::endl; in test_with()
101 v2 = v2 + v1; in test_with()
102 std::cout << "v2 = v2 + v1 = " << v2 << std::endl; in test_with()
103 v2 = v2 - v1; in test_with()
104 std::cout << "v2 = v2 - v1 = " << v2 << std::endl; in test_with()
105 v1 *= value_type(1.); in test_with()
106 std::cout << "v1 *= 1. = " << v1 << std::endl; in test_with()
107 v1 *= t; in test_with()
108 std::cout << "v1 *= N = " << v1 << std::endl; in test_with()
111 initialize_vector(v1); in test_with()
112 t = ublas::sum(v1); in test_with()
113 std::cout << "sum (v1) = " << t << std::endl; in test_with()
114 n = ublas::norm_1(v1); in test_with()
115 std::cout << "norm_1 (v1) = " << n << std::endl; in test_with()
116 n = ublas::norm_2(v1); in test_with()
117 std::cout << "norm_2 (v1) = " << n << std::endl; in test_with()
118 n = ublas::norm_inf(v1); in test_with()
119 std::cout << "norm_inf (v1) = " << n << std::endl; in test_with()
121 i = ublas::index_norm_inf(v1); in test_with()
122 std::cout << "index_norm_inf (v1) = " << i << std::endl; in test_with()
125 initialize_vector(v1); in test_with()
127 t = ublas::inner_prod(v1, v2); in test_with()
128 std::cout << "inner_prod (v1, v2) = " << t << std::endl; in test_with()
134 V v1(N, N), v2(N, N), v3(N, N); in operator ()() local
135 test_with(v1, v2, v3); in operator ()()
138 ublas::vector_range<V> vr1(v1, ublas::range(0, N)), in operator ()()
145 ublas::vector_slice<V> vs1(v1, ublas::slice(0, 1, N)), in operator ()()