[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [CHANGESET]: First attempt at a single precision type.
From: |
John W. Eaton |
Subject: |
Re: [CHANGESET]: First attempt at a single precision type. |
Date: |
Wed, 30 Apr 2008 13:14:40 -0400 |
On 30-Apr-2008, David Bateman wrote:
| John W. Eaton wrote:
| > I would expect we could handle those with simple inline wrappers
| > defined in .h files. For example, see the attached patch. It would
| > not be difficult to extend this to mixed types (complex/float/double),
| > and to also handle the return type automatically by using a traits
| > class. It will take a little more work to handle stacking matrices
| > and row/column vectors and diag matrices.
| >
| >
| I have a problem with this for methods like
|
| ComplexMatrix ComplexMatrix::stack (const Matrix&) const;
|
| I'd like to use a template in MArray2 like
|
| template <class U>
| MArray<T> MArray<T>::stack const (const MArray<U>&) const;
|
| and final hand this off to a similar template method in the Array class
| that does the type coercing, and then define
|
| ComplexMatrix ComplexMatrix::stack (const Matrix&) const
| {
| return MArray2<T>::stack (a);
| }
|
| however the MArray2 template method doesn't appear to be found for this
| case. Any ideas how such things should be written?
Did you mean to write this as
ComplexMatrix ComplexMatrix::stack (const Matrix&) const
{
return MArray2<ComplexMatrix>::stack (a);
}
in the ComplexMatrix class?
jwe
- Re: [CHANGESET]: First attempt at a single precision type., (continued)
- Re: [CHANGESET]: First attempt at a single precision type., Jaroslav Hajek, 2008/04/28
- Re: [CHANGESET]: First attempt at a single precision type., David Bateman, 2008/04/28
- Re: [CHANGESET]: First attempt at a single precision type., John W. Eaton, 2008/04/28
- Re: [CHANGESET]: First attempt at a single precision type., John W. Eaton, 2008/04/28
- Re: [CHANGESET]: First attempt at a single precision type., John W. Eaton, 2008/04/28
- Re: [CHANGESET]: First attempt at a single precision type., John W. Eaton, 2008/04/28
- Re: [CHANGESET]: First attempt at a single precision type., David Bateman, 2008/04/29
- Re: [CHANGESET]: First attempt at a single precision type., John W. Eaton, 2008/04/29
- Re: [CHANGESET]: First attempt at a single precision type., David Bateman, 2008/04/29
- Re: [CHANGESET]: First attempt at a single precision type., David Bateman, 2008/04/30
- Re: [CHANGESET]: First attempt at a single precision type.,
John W. Eaton <=
- Re: [CHANGESET]: First attempt at a single precision type., John W. Eaton, 2008/04/30
- Re: [CHANGESET]: First attempt at a single precision type., David Bateman, 2008/04/30
- Re: [CHANGESET]: First attempt at a single precision type., John W. Eaton, 2008/04/30
- Re: [CHANGESET]: First attempt at a single precision type., David Bateman, 2008/04/30
- Re: [CHANGESET]: First attempt at a single precision type., John W. Eaton, 2008/04/28
- Re: [CHANGESET]: First attempt at a single precision type., Jaroslav Hajek, 2008/04/28
- Re: [CHANGESET]: First attempt at a single precision type., David Bateman, 2008/04/29
- Re: [CHANGESET]: First attempt at a single precision type., John W. Eaton, 2008/04/29
- Re: [CHANGESET]: First attempt at a single precision type., David Bateman, 2008/04/29
- Re: [CHANGESET]: First attempt at a single precision type., Peter L., 2008/04/29