Boost logo

Ublas :

Subject: Re: [ublas] unsubscribe
From: Hoerentrup Jobst (jobst.hoerentrup_at_[hidden])
Date: 2012-05-21 03:15:15


Hi Oswin,

shame on me. You are of course absolutely right. The code is fine as it is.
Sorry for the confusion and many thanks,

Jobst


> -----Original Message-----
> From: ublas-bounces_at_[hidden] [mailto:ublas-bounces_at_[hidden]] On
> Behalf Of Oswin Krause
> Sent: Sonntag, 20. Mai 2012 08:24
> To: ublas mailing list
> Subject: Re: [ublas] unsubscribe
>
> Hi,
>
> When multiplying a vector with a matrix from the right i.e. b=Ax (b,x
> vectors) as in the call in line 76
> the result is defined as the scalar product of every row of the matrix with
> the vector. Which means that the result will have A.size1() entries.
>
> When multiplying from the left as in b=xA it is the same as b=trans(A)x, so
> the result has A.size2() entries.
>
> Hope i could help.
>
> Greetings,
> Oswin
>
> On 2012-05-19 23:58, R Kannan wrote:
> > On 4 May 2012 08:27, Hoerentrup Jobst
> > <jobst.hoerentrup_at_[hidden] [5]> wrote:
> >
> >> Dear ublas experts,
> >>
> >> I am a newbie to ublas, but I have the impression there might be a
> >> bug in axpy_prod:
> >>
> >> operation.hpp, line 76:
> >>
> >> Instead of
> >>
> >>        if (init)
> >>            v.assign (zero_vector<value_type> (e1.size1 ()));
> >>
> >> I believe it should rather be
> >>
> >>        if (init)
> >>            v.assign (zero_vector<value_type> (e1.size2 ()));
> >>
> >> Reason: The length of the result vector should match the number of
> >> matrix columns, not rows.
> >>
> >> Line 76 is just one example, there are a few more places with the
> >> same potential bug.
> >>
> >> Ublas looks relatively mature to me, so am I missing something?
> >>
> >> Many thanks,
> >>
> >> Jobst
> >>
> >> ---
> >>
> >> Jobst Hörentrup
> >> Technicolor R&I Germany
> >>
> >> jobst.hoerentrup_at_[hidden] [1]
> >>
> >> Deutsche Thomson OHG
> >> Karl-Wiechert-Allee 74
> >> 30625 Hannover, Germany
> >>
> >> Offene Handelsgesellschaft, Sitz Hannover, Registergericht Hannover
> >> HRA 24616
> >> Generalbevollmächtigte:
> >> David Christophe Chambeaud, Dr. Peter Jax, Horst Kuhn, Vincent
> >> Rimbeau Persönlich haftende Gesellschafterinnen:
> >> Société Francaise d' Investissement et d 'Arbitrage S.O.F.I.A.
> >> Issy-les-Moulineaux, Handelsregister R.C.S. Nanterre
> >> 785610932
> >> Technicolor International SAS, Issy-les-Moulineaux, Handelsregister
> >> R.C.S. Nanterre 439290735
> >>
> >> _______________________________________________
> >> ublas mailing list
> >> ublas_at_[hidden] [2]
> >> http://lists.boost.org/mailman/listinfo.cgi/ublas [3] Sent to:
> >> ltbuckling+ublas_at_[hidden] [4]
> >
> >
> >
> > Links:
> > ------
> > [1] mailto:jobst.hoerentrup_at_[hidden]
> > [2] mailto:ublas_at_[hidden]
> > [3] http://lists.boost.org/mailman/listinfo.cgi/ublas
> > [4] mailto:ltbuckling%2Bublas_at_[hidden]
> > [5] mailto:jobst.hoerentrup_at_[hidden]
>
> _______________________________________________
> ublas mailing list
> ublas_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/ublas
> Sent to: jobst.hoerentrup_at_[hidden]