Re: sparse matrix support in MathML

How wise is it to require specifying every row? You get the benefit  
of having sparse columns, but the markup is still dense in the rows.  
I would suggest:

<smatrix rows="m" cols="n">
	<smatrixdefault><cn>0</cn></smatrixdefault>
	<smatrixelement row="i" col="j"><cn>5</cn></smatrixelement>
	...
</smatrix>

As far as I know, programs like Matlab simply uses a list of (i,j)- 
 >value tuples in their sparse matrix implementation (or at least  
makes it appear that way to the user), and this is a direct  
reflection of it.

-Jason Davis


On May 31, 2007, at 9:16 AM, Max Berger wrote:

> Dear David,
>
> David Carlisle schrieb:
>>> - Reuse mtable, mrow, mcolumn (otherwise functionality is  
>>> duplicated).
>>
>> wouldn't you want to use content markup rather than presentation for
>> this?
>
> You are right. Assuming display math is for displaying only, and
> therefore it wouldn't matter to insert numerous extra <mtd>, the
> original idea of introducing a <smatrix> for content markup seems fine
> to me. However, I think the ideas of attribute handling are still  
> valid.
>
> Here is an idea for the "rest" of the matrix:
>
> <smatrix columns="4">
>   <smatrixdefalut><cn>0</cn><smatrixdefault>
>   <smatrixrow>
>     <smatrixelem col="1"><cn>1</cn></smatrixelem>
>     <smatrixelem col="2"><cn>2</cn></smatrixelem>
>   </smatrixrow>
>   <smatrixrow>
>     <smatrixelem col="4"><cn>3</cn></smatrixelem>
>   </smatrixrow>
>   <smatrixrow>
>     <smatrixelem col="4"><cn>4</cn></smatrixelem>
>   </smatrixrow>
> </smatrix>
>
> the "smatrixdefault" element would give the "default" value for all
> unspecified elements. If not given, I believe <cn>0</cn> seems like a
> good default value. However, one would have to use <smatrixdefault/ 
> > to
> empty the default element.
>
>
>> David
>
>
> mfG
>
> Max Berger
> e-mail: max@berger.name
>
> -- 
> OpenPG ID: E81592BC   Print: F489F8759D4132923EC4 BC7E072AB73AE81592BC
> For information about me and my work please see http://max.berger.name
>

Received on Thursday, 31 May 2007 23:41:46 UTC