Re: [eigen] first time usage by me! and very satisfied! |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] first time usage by me! and very satisfied!
- From: "Schleimer, Ben" <bensch128@xxxxxxxxx>
- Date: Fri, 12 Sep 2008 09:29:07 -0700 (PDT)
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Message-ID; b=ORUwha53aT0Qzjz3M9VCtbIdJ8491UhXm8/DKYLixDRF9f+jql+bxlHiNMIQ67rhTQ91E3OOK1s1SdAMmryv65ocmWSEf7kIcsFCCRyC+q/CwuAmWnooJMv96u3gU8O8WpfWcS7fdbzExcO76o4VBQjMAlmT1Bx/CV2+6uM8elo=;
Hi Gael,
I just like jumping in and adding my two cents:
>
> indeed I though it would not harm to add shortcuts for most
> common
> statistic reduction methods. they would be added in the
> Array module,
> and also be available in a column and row wise flavors.
You might want to consider adding another module (Statistics) instead of adding it to core Array. There's lots of these kinds of algos which can be added but not necessarily useful for non-statistians.
I don't know if would be better to extend Array via composition or inheritance in this case. It would be possible to accelerate the algos by using caching in the derived class. Maybe make caching a trait...
>
> /* use the precomputed mean to compute the stddev */
> Scalar stddev(const Scalar& mean) const;
> /* shortcut */
> Scalar stddev() const { return stddev(mean()); }
use caching instead of the first method
>
> maybe we can even have a single version with a default arg
> value:
> Scalar stddev(const Scalar& _mean = mean()) const;
> but I don't know if it's legal to call a non static
> member function on *this...
This is definitely not legal. Default arguments have to be set at compile time.
> I prefer that to something like:
> Scalar stddev(Scalar* returnedMean = 0) const;
> because in case you have already computed the mean value
> you cannot
> tell stddev to use it...
This is confusing. what does the function return if returnedMean == 0?
It might be better to cache the mean and not return it in the stddev() method. The user has access to it in mean(), no?
>
> so to summarize we would add:
>
> * mean()
>
> * standardDeviation([precomputed_mean])
> yeah, eventually "standardDeviation" is not too
> long
>
> * variance([precomputed_mean])
>
> * median()
> maybe here we could have an optional argument to tell if
> the vector is
> already sorted ??
We could have a cached sorted flag...
>
> * sort()
> median needs a sort algo, and here I really mean
> "sort", not "sorted",
> so it an in-place sort
>
Cheers
Ben
>
> cheers,
> gael.
>
> On Thu, Sep 11, 2008 at 8:29 PM, Andre Krause
> <post@xxxxxxxxxxxxxxxx> wrote:
> > dear list, just wanted to let you all know i am using
> eigen2 alpha 07 for the
> > first time - and i am very satisfied. works like
> charm, with no problems on
> > win32 and visualc++ 2008.
> >
> > though i am missing some basic convenience functions
> like mean, medium, stdev
> > etc. . i already heard on #eigen, that they are
> planned for some future release.
> >
> > kind regards,
> > andre
> >
> >
> >