0.9.5 release branch

View: New views
5 Messages — Rating Filter:   Alert me  

0.9.5 release branch

by Luigi Ballabio :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi all,
        since a new release is long overdue, and since I've only so much time,
I've created the 0.9.5 release branch; you can check it out from the
Subversion repository as
<https://quantlib.svn.sourceforge.net/svnroot/quantlib/branches/R000905-branch>.

Apologies to those whose contributions didn't make into this release.
I'll try to add them shortly, and to make another release to get them
out in the open.

For those with svn access: as usual, bug fixes should now go on the
0.9.5 branch, while new features should be added on the trunk.

Luigi


--

Westheimer's Discovery:
A couple of months in the laboratory can frequently save a
couple of hours in the library.



-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
QuantLib-dev mailing list
QuantLib-dev@...
https://lists.sourceforge.net/lists/listinfo/quantlib-dev

Re: 0.9.5 release branch

by Harun Özkan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

SWIG CSharp -as well as other target languages i guess- files are missing in
the 0.9.5 relase.


----- Original Message -----
From: "Luigi Ballabio" <luigi.ballabio@...>
To: "QuantLib developers" <quantlib-dev@...>
Sent: Thursday, July 03, 2008 12:00 PM
Subject: [Quantlib-dev] 0.9.5 release branch


>
> Hi all,
> since a new release is long overdue, and since I've only so much time,
> I've created the 0.9.5 release branch; you can check it out from the
> Subversion repository as
> <https://quantlib.svn.sourceforge.net/svnroot/quantlib/branches/R000905-branch>.
>
> Apologies to those whose contributions didn't make into this release.
> I'll try to add them shortly, and to make another release to get them
> out in the open.
>
> For those with svn access: as usual, bug fixes should now go on the
> 0.9.5 branch, while new features should be added on the trunk.
>
> Luigi
>
>
> --
>
> Westheimer's Discovery:
> A couple of months in the laboratory can frequently save a
> couple of hours in the library.
>
>
>
> -------------------------------------------------------------------------
> Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
> Studies have shown that voting for your favorite open source project,
> along with a healthy diet, reduces your potential for chronic lameness
> and boredom. Vote Now at http://www.sourceforge.net/community/cca08
> _______________________________________________
> QuantLib-dev mailing list
> QuantLib-dev@...
> https://lists.sourceforge.net/lists/listinfo/quantlib-dev 


-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
QuantLib-dev mailing list
QuantLib-dev@...
https://lists.sourceforge.net/lists/listinfo/quantlib-dev

Re: 0.9.5 release branch

by Luigi Ballabio :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Fri, 2008-07-04 at 17:03 +0300, Harun Özkan wrote:
> SWIG CSharp -as well as other target languages i guess- files are missing in
> the 0.9.5 relase.

I know---they're not stored in the Subversion repository. You have to
generate them with SWIG. They will be included in the released tarball.

Luigi


--

Better to remain silent and be thought a fool than to speak out and
remove all doubt.
-- Abraham Lincoln



-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
QuantLib-dev mailing list
QuantLib-dev@...
https://lists.sourceforge.net/lists/listinfo/quantlib-dev

Re: 0.9.5 release branch

by Ferdinando Ametrano :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Jul 3, 2008 at 11:00 AM, Luigi Ballabio
<luigi.ballabio@...> wrote:
> I've created the 0.9.5 release branch; you can check it out from the
> Subversion repository as
> <https://quantlib.svn.sourceforge.net/svnroot/quantlib/branches/R000905-branch>.

I'm testing VC 7/8/9 and so far everything is ok but the following
error in the test suite:
Testing QR solve...
unknown location(0): fatal error in
"QuantLib::detail::quantlib_test_case(&MatricesTest::testQRSolve)":
memory access violation occurred at address 0x01c8d000, while
attempting to  read inaccessible data
c:\projects\devenv\r000905-branch\quantlib\test-suite\utilities.hpp(76):
last checkpoint
Test is aborted

The error is obtained using VC7 with boost 1.35. No problem with VC8.

I don't have time to investigate further... any volunteer to take a look at it?

thanks

ciao -- Nando

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
QuantLib-dev mailing list
QuantLib-dev@...
https://lists.sourceforge.net/lists/listinfo/quantlib-dev

Parent Message unknown Re: 0.9.5 release branch

by Klaus Spanderen-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi

Nando wrote:
>I'm testing VC 7/8/9 and so far everything is ok but the following
>error in the test suite:
>Testing QR solve...

Thanks for hint, this problem is caused by a bug in qrdecomposition.cpp. The
file attached should fix it (.. and valgrind is now fine with the test
suite). Give me another day to double check it.

regards
  Klaus

[qrdecomposition.cpp]

/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */

/*
 Copyright (C) 2008 Klaus Spanderen

 This file is part of QuantLib, a free-software/open-source library
 for financial quantitative analysts and developers - http://quantlib.org/

 QuantLib is free software: you can redistribute it and/or modify it
 under the terms of the QuantLib license.  You should have received a
 copy of the license along with this program; if not, please email
 <quantlib-dev@...>. The license is also available online at
 <http://quantlib.org/license.shtml>.

 This program is distributed in the hope that it will be useful, but WITHOUT
 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 FOR A PARTICULAR PURPOSE.  See the license for more details.
*/

/*! \file qrdecomposition.cpp
    \brief QR decomposition
*/

#include <ql/math/optimization/lmdif.hpp>
#include <ql/math/matrixutilities/qrdecomposition.hpp>

namespace QuantLib {

    Disposable<std::vector<Size> > qrDecomposition(const Matrix& M,
                                                       Matrix& q, Matrix& r,
                                                       bool pivot) {
        Matrix mT = transpose(M);
        const Size m = M.rows();
        const Size n = M.columns();
   
        boost::scoped_array<int> lipvt(new int[n]);
        boost::scoped_array<double> rdiag(new double[n]);
        boost::scoped_array<double> wa(new double[n]);
   
        MINPACK::qrfac(m, n, mT.begin(), 0, (pivot)?1:0,
                       lipvt.get(), n, rdiag.get(), rdiag.get(), wa.get());

        if (r.columns() != n || r.rows() !=n)
            r = Matrix(n, n);
   
        for (Size i=0; i < n; ++i) {
            std::fill(r.row_begin(i), r.row_begin(i)+i, 0.0);
            r[i][i] = rdiag[i];
            std::copy(mT.column_begin(i)+i+1, mT.column_end(i),
                      r.row_begin(i)+i+1);
        }

        if (q.rows() != m || q.columns() != n)
            q = Matrix(m, n);

        Array w(m);
        for (Size k=0; k < m; ++k) {
            std::fill(w.begin(), w.end(), 0.0);
            w[k] = 1.0;
   
            for (Size j=0; j < std::min(n, m); ++j) {
                const Real t3 = mT[j][j];
                if (t3 != 0.0) {
                    const Real t
                        = std::inner_product(mT.row_begin(j)+j, mT.row_end(j),
                                             w.begin()+j, 0.0)/t3;
                    for (Size i=j; i<m; ++i) {
                        w[i]-=mT[j][i]*t;
                    }
                }
                q[k][j] = w[j];
            }
            std::fill(q.row_begin(k) + std::min(n, m), q.row_end(k), 0.0);
        }
   
        std::vector<Size> ipvt(n);
        if (pivot) {
            std::copy(lipvt.get(), lipvt.get()+n, ipvt.begin());
        }
        else {
            for (Size i=0; i < n; ++i)
                ipvt[i] = i;
        }

        return ipvt;              
    }
       
    Disposable<Array> qrSolve(const Matrix& a, const Array& b,
                              bool pivot, const Array& d) {
        const Size m = a.rows();
        const Size n = a.columns();
               
        QL_REQUIRE(b.size() == m, "dimensions of A and b don't match");
        QL_REQUIRE(d.size() == n || d.empty(),
                   "dimensions of A and d don't match");
   
        Matrix q(m, n), r(n, n);
   
        std::vector<Size> lipvt = qrDecomposition(a, q, r, pivot);
        boost::scoped_array<int> ipvt(new int[n]);
        std::copy(lipvt.begin(), lipvt.end(), ipvt.get());
   
        Matrix aT = transpose(a);
        Matrix rT = transpose(r);

        boost::scoped_array<double> sdiag(new double[n]);
        boost::scoped_array<double> wa(new double[n]);
   
        Array ld(n, 0.0);
        if (!d.empty()) {
            std::copy(d.begin(), d.end(), ld.begin());
        }
        Array x(n);
        Array qtb = transpose(q)*b;

        MINPACK::qrsolv(n, rT.begin(), n, ipvt.get(),
                        ld.begin(), qtb.begin(),
                        x.begin(), sdiag.get(), wa.get());

        return x;
    }
}


-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
QuantLib-dev mailing list
QuantLib-dev@...
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
LightInTheBox - Buy quality products at wholesale price