On Fri, 21 May 2004, Radek Pecher wrote:
- although Tensor.h:338 claims:
// The format is: ((t(0,0) t(1,0),... ) ( t(0,1) t(1,1) ... ) ... ))
the truth is in fact:
// The format is: ((t(0,0) t(0,1),... ) ( t(1,0) t(1,1) ... ) ... ))
- this is contrary to TinyMatrix because of the i,j-swapping
(compare: Tensor.h:361 and TinyMatrix.h:236)
That is indeed inconsistent(?). I don't know what to do on this one, but
it seems purely cosmetic. I'd suggest fixing the comments and not swap
the indices in TinyMatrix.h:239. Jeffrey?
====================================================================
- line /src/Tiny/VectorOperators.h:189
inline typename BinaryReturn< Vector<D,T1,E>, T2, TAG >::Type_t
should correctly be:
inline typename BinaryReturn< T1, Vector<D,T2,E>, TAG >::Type_t
- this error may cause problems if T1 and T2 are different types and
when stricter type-conversions are imposed
Indeed. And the same error in TensorOperators.h and
TinyMatrixOperators.h.
====================================================================
- line /src/DynamicArray/DynamicArray.h:373
: Array<Dim, T, EngineTag>(s1, model)
should correctly be:
: Array<1, T, EngineTag>(s1, model)
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
This is fixed in CVS already.
Jeffrey, ok to apply the following patch? Compiled and tested Tiny/ on
ia32-linux with gcc 3.4.
Richard.
2004May24 Richard Guenther <address@hidden>
* src/Tiny/VectorOperators.h: use correct return type.
src/Tiny/TensorOperators.h: likewise.
src/Tiny/TinyMatrixOperators.h: likewise.
Index: Tiny/TensorOperators.h
===================================================================
RCS file: /home/pooma/Repository/r2/src/Tiny/TensorOperators.h,v
retrieving revision 1.20
diff -u -u -r1.20 TensorOperators.h
--- Tiny/TensorOperators.h 7 Mar 2000 13:18:13 -0000 1.20
+++ Tiny/TensorOperators.h 24 May 2004 08:44:03 -0000
@@ -210,7 +210,7 @@
} \
\
template <int D, class T1, class T2, class E> \
-inline typename BinaryReturn< Tensor<D,T1,E>, T2, TAG >::Type_t \
+inline typename BinaryReturn< T1, Tensor<D,T2,E>, TAG >::Type_t \
FUNC( const T1& x, const Tensor<D,T2,E>& v2 ) \
{ \
typedef Tensor<D,T2,E> V2; \
Index: Tiny/TinyMatrixOperators.h
===================================================================
RCS file: /home/pooma/Repository/r2/src/Tiny/TinyMatrixOperators.h,v
retrieving revision 1.3
diff -u -u -r1.3 TinyMatrixOperators.h
--- Tiny/TinyMatrixOperators.h 7 Mar 2000 13:18:14 -0000 1.3
+++ Tiny/TinyMatrixOperators.h 24 May 2004 08:44:03 -0000
@@ -196,7 +196,7 @@
} \
\
template <int D1, int D2, class T1, class T2, class E> \
-inline typename BinaryReturn< TinyMatrix<D1,D2,T1,E>, T2, TAG >::Type_t \
+inline typename BinaryReturn< T1, TinyMatrix<D1,D2,T2,E>, TAG >::Type_t \
FUNC( const T1& x, const TinyMatrix<D1,D2,T2,E>& v2 ) \
{ \
typedef TinyMatrix<D1,D2,T2,E> V2; \
Index: Tiny/VectorOperators.h
===================================================================
RCS file: /home/pooma/Repository/r2/src/Tiny/VectorOperators.h,v
retrieving revision 1.17
diff -u -u -r1.17 VectorOperators.h
--- Tiny/VectorOperators.h 5 Mar 2002 16:14:38 -0000 1.17
+++ Tiny/VectorOperators.h 24 May 2004 08:44:03 -0000
@@ -186,7 +186,7 @@
} \
\
template <int D, class T1, class T2, class E> \
-inline typename BinaryReturn< Vector<D,T1,E>, T2, TAG >::Type_t \
+inline typename BinaryReturn< T1, Vector<D,T2,E>, TAG >::Type_t \
FUNC( const T1& x, const Vector<D,T2,E>& v2 ) \
{ \
typedef Vector<D,T2,E> V2; \