|Re: [eigen] sparse matrix wrapper flavour|
[ Thread Index |
| More lists.tuxfamily.org/eigen Archives
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] sparse matrix wrapper flavour
- From: "Schleimer, Ben" <bensch128@xxxxxxxxx>
- Date: Thu, 26 Jun 2008 11:17:14 -0700 (PDT)
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Received:X-Mailer:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Message-ID; b=fOo11jBHv9jfA0ciRSl1ZaBbdyh59KvE0vf8M5BnJXgZAw5s7oHk2twgh/aJiv3QHS1MjRUg6/UrWzwjtPB1Y3h0Jx1nrJhhMv0bMwhxayGDQ19Izvjn3G0GqmZAMqppevftUanutp8NPi15D04wuxOs8Lt/4W1bs4a3qjbclb4=;
> Given the choice, I tend to prefer storing a member object
> rather than
I have to agree the wrapper seems like it would HASA matrix as opposed to ISA matrix.
> So, I vote for (2). The only thing is, make sure that the
> wrapper class
> doesn't have a member (method or data) with the same
> name as a member of the
> wrapped class. So that if the user forgets to use
> "->" instead of "." he will
> get a compiler error. Otherwise the bug could be very hard
> to spot!
I think you can enforce that a wrapper is only a value type by making it's new/delete operator private. Then the user would have to be very persistent to break this functionality.