[PATCH] Fix TinyMatrix print inconsistency

Richard Guenther rguenth at tat.physik.uni-tuebingen.de
Tue May 25 18:14:19 UTC 2004


Jeffrey D. Oldham wrote:
> Richard Guenther wrote:
> 
>> 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?
>>  
>>
> 
> I agree that consistency is important.  Which particular ordering to 
> choose is not important to me.  Arrays print out in the actual order 
> (0,0), (0,1), etc. so I think tensors should also.  The commented tensor 
> ordering probably follows from the comments concerning the three types 
> of tensors and wishing to print those values.

That would be the following patch. Tested with Tiny tests, ok?

Richard.

2004May25  Richard Guenther <richard.guenther at uni-tuebingen.de>

	* src/Tiny/Tensor.h: fix comments describing output format.
	src/Tiny/TinyMatrix.h: fix comments describing output format,
	fix output format to match the one of tensors.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: p
URL: <http://sourcerytools.com/pipermail/pooma-dev/attachments/20040525/fcb66703/attachment.ksh>


More information about the pooma-dev mailing list