Changeset 1015 for library/bdm/base
- Timestamp:
- 05/27/10 23:08:07 (14 years ago)
- Location:
- library/bdm/base
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
library/bdm/base/user_info.cpp
r959 r1015 257 257 new_field = matrix ( i, j ); 258 258 } 259 } 260 261 void UI::save ( const ldmat &matrix, Setting &element, const string &name ) { 262 Setting &set = ( name == "" ) ? element.add ( Setting::TypeGroup) 263 : element.add ( name, Setting::TypeGroup ); 264 265 save (matrix._L(), set, "L"); 266 save (matrix._D(), set, "D"); 259 267 } 260 268 … … 371 379 } 372 380 381 void UI::from_setting ( ldmat& matrix, const Setting &element ) { 382 if(element.exists("L")){ 383 UI::from_setting(matrix.__L(), element["L"]); 384 } 385 if(element.exists("D")){ 386 UI::from_setting(matrix.__D(), element["D"]); 387 } 388 matrix.validate(); 389 } 390 373 391 void UI::from_setting ( vec &vector, const Setting &element ) { 374 392 const SettingResolver link ( element ); -
library/bdm/base/user_info.h
r959 r1015 25 25 #include "../shared_ptr.h" 26 26 #include "itpp/itbase.h" 27 #include "../math/square_mat.h" 28 #include "../math/chmat.h" 27 29 28 30 using std::string; … … 302 304 //! This method converts a Setting into a matrix 303 305 static void from_setting ( mat& matrix, const Setting &element ); 306 //! This method converts a Setting into a ldmat 307 static void from_setting ( ldmat& matrix, const Setting &element ); 304 308 //! This method converts a Setting into an integer vector 305 309 static void from_setting ( ivec &vector, const Setting &element ); … … 550 554 //! A matrix(of type mat) is stored in the new child Setting appended to the passed element 551 555 static void save ( const mat &matrix, Setting &element, const string &name = "" ); 552 556 557 //! A matrix(of type mat) is stored in the new child Setting appended to the passed element 558 static void save ( const ldmat &matrix, Setting &element, const string &name = "" ); 559 553 560 //! An integer vector (of type ivec) is stored in the new child Setting appended to the passed element 554 561 static void save ( const ivec &vec, Setting &element, const string &name = "" );