Hello I’d like to get the inverse of a quantlib matrix
but apparently it’s not possible using boost::uBlAS I’m using MSVC10 and the latest quantlib 1.1 and
boost 1.47 Is there another way to get the inverse of a quantlib
matrix? Regards
------------------------------------------------------------------------------ The demand for IT networking professionals continues to grow, and the demand for specialized networking skills is growing even more rapidly. Take a complimentary Learning@Cisco Self-Assessment and learn about Cisco certifications, training, and career opportunities. http://p.sf.net/sfu/cisco-dev2dev _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Can you not use another library that can calculate the inverse of a matrix such as this. |
On Oct 31, 2011, at 8:29 PM, StephenWong wrote: > Viala Jean-Renaud (AMUNDI) wrote: >> >> I'd like to get the inverse of a quantlib matrix but apparently >> it's not >> possible using boost::uBlAS >> >> I'm using MSVC10 and the latest quantlib 1.1 and boost 1.47 >> >> Is there another way to get the inverse of a quantlib matrix? > > Can you not use another library that can calculate the inverse of a > matrix > such as http://www.alglib.net/matrixops/inv.php this . Probably not, if he needs to use instances of our Matrix class elsewhere in the code. Jean-Renaud, I think the block was put there for a previous version of Boost. Can you re-enable uBlas (you can do this by commenting line 97 in ql/config.msvc.hpp) and see if it work with your version? In any case, please write back and tell me what happens. Thanks, Luigi ------------------------------------------------------------------------------ Get your Android app more play: Bring it to the BlackBerry PlayBook in minutes. BlackBerry App World™ now supports Android™ Apps for the BlackBerry® PlayBook™. Discover just how easy and simple it is! http://p.sf.net/sfu/android-dev2dev _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Hi
Thanks to Stephen Wong for the Link. However I'm adding functions to QuantLibXl and I would like to use Quantlib Matrix Object as much as possible to avoid too many nightmare in updating the librry I tried what Luigi Ballabo suggested and I got the following error massage during the compilation of Project QuantlibObjects (in Static Debug mode MSVC10) Do you have any ideas? I'm using MSVC10 and the latest quantlib 1.1.0 and boost 1.47 Regards JRViala 1>------ Début de la génération : Projet : QuantLib, Configuration : Debug (static runtime) Win32 ------ 1>La génération a démarré 02/11/2011 18:26:02. 1>InitializeBuildStatus: 1> Mise à jour de l'horodatage ".\build\vc100\Win32\Debug (static runtime)\QuantLib.unsuccessfulbuild". 2>------ Début de la génération : Projet : QuantLibObjects, Configuration : Debug (static runtime) Win32 ------ 2>La génération a démarré 02/11/2011 18:26:17. 2>InitializeBuildStatus: 2> Création de ".\build\vc100\Debug (static runtime)\QuantLibObjects.unsuccessfulbuild", car "AlwaysCreate" a été spécifié. 2>ClCompile: 2> Toutes les sorties sont à jour. 2>Lib: 2> Toutes les sorties sont à jour. 2> QuantLibObjects_vc10.vcxproj -> C:\Quantlib\build_ql_1_1_0\QuantLibAddin\.\lib\QuantLibObjects-vc100-mt-sgd-1_1_0.lib 2>FinalizeBuildStatus: 2> Suppression du fichier ".\build\vc100\Debug (static runtime)\QuantLibObjects.unsuccessfulbuild". 2> Mise à jour de l'horodatage ".\build\vc100\Debug (static runtime)\QuantLibObjects.lastbuildstate". 2> 2>La génération a réussi. 2> 2>Temps écoulé 00:00:01.74 1>ClCompile: 1> sparseilupreconditioner.cpp 1>C:\Quantlib\boost_1_47\boost/numeric/ublas/vector_of_vector.hpp(301): error C2668: 'boost::numeric::ublas::ref' : appel ambigu à une fonction surchargée 1> C:\Quantlib\boost_1_47\boost/numeric/ublas/vector_sparse.hpp(174): peut être 'boost::numeric::ublas::compressed_vector<T> &boost::numeric::ublas::ref<boost::numeric::ublas::compressed_vector<T>>(VER &)' 1> with 1> [ 1> T=QuantLib::Integer, 1> VER=boost::numeric::ublas::compressed_vector<QuantLib::Integer> 1> ] 1> c:\Program Files\Microsoft Visual Studio 10.0\VC\include\xrefwrap(439): ou 'std::tr1::reference_wrapper<_Ty> std::tr1::ref<T>(_Ty &)' [trouvé à l'aide d'une recherche dépendante d'un argument] 1> with 1> [ 1> _Ty=boost::numeric::ublas::compressed_vector<QuantLib::Integer>, 1> T=boost::numeric::ublas::compressed_vector<QuantLib::Integer> 1> ] 1> lors de la tentative de mise en correspondance de la liste des arguments '(boost::numeric::ublas::compressed_vector<T>)' 1> with 1> [ 1> T=QuantLib::Integer 1> ] 1> C:\Quantlib\boost_1_47\boost/numeric/ublas/vector_of_vector.hpp(298) : lors de la compilation de la fonction membre 'int &boost::numeric::ublas::generalized_vector_of_vector<T,L,A>::insert_element(unsigned int,unsigned int,const int &)' de la classe modèle 1> with 1> [ 1> T=QuantLib::Integer, 1> L=boost::numeric::ublas::row_major, 1> A=boost::numeric::ublas::vector<boost::numeric::ublas::compressed_vector<QuantLib::Integer>> 1> ] 1> ql\experimental\finitedifferences\sparseilupreconditioner.cpp(61) : voir la référence à l'instanciation de la classe modèle 'boost::numeric::ublas::generalized_vector_of_vector<T,L,A>' en cours de compilation 1> with 1> [ 1> T=QuantLib::Integer, 1> L=boost::numeric::ublas::row_major, 1> A=boost::numeric::ublas::vector<boost::numeric::ublas::compressed_vector<QuantLib::Integer>> 1> ] 1>C:\Quantlib\boost_1_47\boost/numeric/ublas/vector_of_vector.hpp(301): fatal error C1903: impossible de récupérer à partir des erreurs précédentes ; arrêt de la compilation 1> 1>ÉCHEC de la build. 1> 1>Temps écoulé 00:00:30.31 ========== Génération : 1 a réussi, 1 a échoué, 6 mis à jour, 0 a été ignoré ==========
|
Hello
Do you have anyinsight on this subject? I'd rather not try and debugg Boost it seems a little over my league An alternative would be to code an Inverse function "boost free" directly into the quantlib::matrix object but it seems rather inelegant to me In this case wouldn't this topic be more appropriate in the developper-list? Regards
|
In reply to this post by Luigi Ballabio
Hi I must have made a mistake in my previous compilation Now Inverse works when re-enabling UBLAS in matrix.cpp Regards JRV -----Original Message----- From: [hidden email] [mailto:[hidden email]] On Behalf Of Luigi Ballabio Sent: Monday, October 31, 2011 9:47 PM To: StephenWong Cc: [hidden email] Subject: Re: [Quantlib-users] How to get the inverse of a Quantlib Matrix inMSVC10 On Oct 31, 2011, at 8:29 PM, StephenWong wrote: > Viala Jean-Renaud (AMUNDI) wrote: >> >> I'd like to get the inverse of a quantlib matrix but apparently >> it's not >> possible using boost::uBlAS >> >> I'm using MSVC10 and the latest quantlib 1.1 and boost 1.47 >> >> Is there another way to get the inverse of a quantlib matrix? > > Can you not use another library that can calculate the inverse of a > matrix > such as http://www.alglib.net/matrixops/inv.php this . Probably not, if he needs to use instances of our Matrix class elsewhere in the code. Jean-Renaud, I think the block was put there for a previous version of Boost. Can you re-enable uBlas (you can do this by commenting line 97 in ql/config.msvc.hpp) and see if it work with your version? In any case, please write back and tell me what happens. Thanks, Luigi ------------------------------------------------------------------------ ------ Get your Android app more play: Bring it to the BlackBerry PlayBook in minutes. BlackBerry App World™ now supports Android™ Apps for the BlackBerry® PlayBook™. Discover just how easy and simple it is! http://p.sf.net/sfu/android-dev2dev _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users ------------------------------------------------------------------------------ RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Free forum by Nabble | Edit this page |