5 typedef __SIZE_TYPE__ size_t;
10 template <typename> struct complex;
11 template <typename _Tp>
12 complex<_Tp> operator+(complex<_Tp> &__x, complex<_Tp> __y)
18 template <> struct complex<double>
23 return __imag__ _M_value;
25 void operator+=(complex __z) { _M_value += _M_value; _M_value += __z.imag (); }
26 _Complex double _M_value;
31 typedef std::complex<double> &const_reference;
37 std::complex<double> &operator[](int i) { return data_[i]; }
38 std::complex<double> *data_;
42 static std::complex<double>
43 apply (A::const_reference t1, std::complex<double> t2)
47 typedef std::complex<double> result_type;
49 template <class T1, class> struct D
52 apply (T1 t1, std::complex<double> t2)
57 class ublas_expression
62 template <class> class F
65 template <class E> class matrix_expression : ublas_expression
70 class I : public F<int>
73 typedef int value_type;
76 template <class E1, class E2> matrix_expression<int> outer_prod (F<E1>, F<E2>);
77 template <class E1, class F> class J : public matrix_expression<J<E1, F> >
80 typedef typename F::result_type value_type;
81 value_type operator()(int i, int)
83 return F::apply (e1_ (i, 0), e2_ (0, 0));
88 template <class E1, class E2>
89 J<H, C> operator+(matrix_expression<E1>, matrix_expression<E2>);
90 template <template <class, class> class F, class M, class E>
92 indexing_matrix_assign (M m, matrix_expression<E> e, int)
95 F<typename M::reference, typename E::value_type>::apply (m (0, 0),
98 template <template <class, class> class F, class, class M, class E, class C>
100 matrix_assign (M m, matrix_expression<E> e, int, C)
102 indexing_matrix_assign<F> (m, e, 0);
104 template <template <class, class> class F, class M, class E>
106 matrix_assign (M m, matrix_expression<E> e)
108 matrix_assign<F, int> (m, e, 0, typename M::orientation_category ());
110 class H : matrix_expression<int>
113 typedef std::complex<double> &reference;
114 typedef int orientation_category;
115 H (int, int) : data_ (0) {}
116 template <class AE> H (matrix_expression<AE> ae) : data_ (0)
118 matrix_assign<D> (*this, ae);
124 std::complex<double> &operator()(int i, int) { return data ()[i]; }
125 void operator+=(matrix_expression ae) { H (*this + ae); }
128 template <class M, class T, class V1, class V2>
130 sr2 (M m, T, V1 v1, V2 v2)
132 m += outer_prod (v2, v1);
134 template <class, class, std::size_t> struct G
138 template struct G<I, H, 3>;
139 template <class V, class M, std::size_t N>
145 sr2 (m, typename V::value_type (), b, c);