Revision 2, 0.9 kB
(checked in by smidl, 16 years ago)
|
first shot
|
Rev | Line | |
---|
[2] | 1 | /*! |
---|
| 2 | * \file |
---|
| 3 | * \brief Matrices in decomposed forms (LDL', LU, UDU', etc). |
---|
| 4 | * \author Vaclav Smidl. |
---|
| 5 | * |
---|
| 6 | * ----------------------------------- |
---|
| 7 | * BDM++ - C++ library for Bayesian Decision Making under Uncertainty |
---|
| 8 | * |
---|
| 9 | * Using IT++ for numerical operations |
---|
| 10 | * ----------------------------------- |
---|
| 11 | */ |
---|
| 12 | |
---|
| 13 | #include <itpp/itbase.h> |
---|
| 14 | |
---|
| 15 | using namespace itpp; |
---|
| 16 | |
---|
| 17 | class LD |
---|
| 18 | { |
---|
| 19 | public: |
---|
| 20 | |
---|
| 21 | /** |
---|
| 22 | * Perfroms a dyadic update $V = V + w v v'$ |
---|
| 23 | * @param v Vector forming the dyad to be added |
---|
| 24 | * @param w weight of the updating dysad |
---|
| 25 | */ |
---|
| 26 | void ldupdt (vec v, double w = 1.0 ); |
---|
| 27 | |
---|
| 28 | //! Construct by copy of L and D. |
---|
| 29 | LD(mat L, vec D); |
---|
| 30 | //! Construct by decomposition of full matrix V. |
---|
| 31 | LD(mat V); |
---|
| 32 | |
---|
| 33 | protected: |
---|
| 34 | vec D; |
---|
| 35 | mat L; |
---|
| 36 | |
---|
| 37 | }; |
---|
| 38 | |
---|
| 39 | LD::LD(const mat exL, const vec exD) { |
---|
| 40 | D = exD; |
---|
| 41 | L = exL; |
---|
| 42 | } |
---|
| 43 | |
---|
| 44 | LD::LD(const mat V) { |
---|
| 45 | ; //not implemneted yet |
---|
| 46 | } |
---|
| 47 | |
---|
| 48 | void LD::ldupdt(vec v, double w ) { |
---|
| 49 | printf("not implemented"); //TODO: VS |
---|
| 50 | } |
---|