517 | | }; |
| 517 | |
| 518 | |
| 519 | /*! UI for mgnorm |
| 520 | |
| 521 | The mgnorm is constructed from a structure with fields: |
| 522 | \code |
| 523 | system = { |
| 524 | type = "mgnorm"; |
| 525 | // function for mean value evolution |
| 526 | g = {type="fnc"; ... } |
| 527 | |
| 528 | // variance |
| 529 | R = [1, 0, |
| 530 | 0, 1]; |
| 531 | // --OR -- |
| 532 | dR = [1, 1]; |
| 533 | |
| 534 | // == OPTIONAL == |
| 535 | |
| 536 | // description of y variables |
| 537 | y = {type="rv"; names=["y", "u"];}; |
| 538 | // description of u variable |
| 539 | u = {type="rv"; names=[];} |
| 540 | }; |
| 541 | \endcode |
| 542 | |
| 543 | Result if |
| 544 | */ |
| 545 | |
| 546 | void from_setting( const Setting &root ) |
| 547 | { |
| 548 | fnc* g = UI::build<fnc>( root, "g" ); |
| 549 | |
| 550 | mat R; |
| 551 | if ( root.exists( "dR" ) ) |
| 552 | { |
| 553 | vec dR; |
| 554 | UI::get( dR, root, "dR" ); |
| 555 | R=diag(dR); |
| 556 | } |
| 557 | else |
| 558 | UI::get( R, root, "R"); |
| 559 | |
| 560 | set_parameters(g,R); |
| 561 | } |
| 562 | |
| 563 | /*void mgnorm::to_setting( Setting &root ) const |
| 564 | { |
| 565 | Transport::to_setting( root ); |
| 566 | |
| 567 | Setting &kilometers_setting = root.add("kilometers", Setting::TypeInt ); |
| 568 | kilometers_setting = kilometers; |
| 569 | |
| 570 | UI::save( passengers, root, "passengers" ); |
| 571 | }*/ |
| 572 | |
| 573 | }; |
| 574 | |
| 575 | UIREGISTER(mgnorm<chmat>); |
| 576 | |
701 | | }; |
| 761 | |
| 762 | /*! UI for migamma_ref |
| 763 | |
| 764 | The migamma_ref is constructed from a structure with fields: |
| 765 | \code |
| 766 | system = { |
| 767 | type = "migamma_ref"; |
| 768 | ref = [1e-5; 1e-5; 1e-2 1e-3]; // reference vector |
| 769 | l = 0.999; // constant l |
| 770 | k = 0.1; // constant k |
| 771 | |
| 772 | // == OPTIONAL == |
| 773 | // description of y variables |
| 774 | y = {type="rv"; names=["y", "u"];}; |
| 775 | // description of u variable |
| 776 | u = {type="rv"; names=[];} |
| 777 | }; |
| 778 | \endcode |
| 779 | |
| 780 | Result if |
| 781 | */ |
| 782 | void from_setting( const Setting &root ); |
| 783 | |
| 784 | // TODO dodelat void to_setting( Setting &root ) const; |
| 785 | }; |
| 786 | |
| 787 | |
| 788 | UIREGISTER(migamma_ref); |