W3C home > Mailing lists > Public > www-math@w3.org > May 2007

Re: sparse matrix support in MathML

From: David Carlisle <davidc@nag.co.uk>
Date: Wed, 30 May 2007 15:01:09 +0100
Message-Id: <200705301401.l4UE19pH028560@edinburgh.nag.co.uk>
To: michael.weitzel@uni-siegen.de
Cc: www-math@w3.org



> Sadly, MathML version 3 does not introduce such a type. 

MathML3 is at first working draft stage, so the functionality that gets
added in the end is still up for discussion. so now's a good time to
raise items for inclusion, so thanks for starting this thread...

> .... support sparse matrices 
Of course in some sense mathml does already

Comparing with OpenMath, Openmath doesn't have built in support for
sparse matrices (or anything else) but does have some CDs for specific
constructs, eg banded matrix CD here

http://www.openmath.org/cd/linalg5.xhtml#banded

The new chapter 4 suggests a much closer relationship between mathml
csymbol usage and openmath Cds which would suggest (even in mathML2)
the example given there, which is

banded
(vector
(vector
(4, 8, 12, 15)
, vector
(1, 5, 9, 13, 16)
, vector
(2, 6, 10, 14)
, vector
(3, 7, 11)
)
)

being represented as something like

<apply>
<!--
    following csymbol could use definition URL, or in MathML3 draft
   cdbase attributes to refer to http://www.openmath.org/cd/linalg5.xhtml#banded
 --> 
<csymbol>banded</csymbol> 
<vector>
<vector><cn>4</cn> <cn>8</cn> <cn>12</cn> <cn>15</cn></vector>
<vector><cn>1</cn> <cn>5</cn> <cn>9</cn> <cn>13</cn> <cn>16</cn></vector>
<vector><cn>2</cn> <cn>6</cn> <cn>10</cn> <cn>14</cn></vector>
<vector><cn>3</cn> <cn>7</cn> <cn>11</cn></vector>
</vector>

Of course there is always a tradeoff between using a generic csymbol
construct (the pure openmath approach) which gives most flexibility in
what may be expressed, but least guarantee that any particular construct
is supported by any given application, and the "classic  k-12 MathML"
approach of having a core set of functionality built into the language 
which is distinguished by a custom syntax and which perhaps therefore
has a better chance of being supported by applictaions which aim to
support "all" of MathML.

So just because something can be expressed using csymbol doesn't mean
that it shouldn't be implemented using a custom syntax such as
(inventing something just for discussion purposes)
<matrix type="banded">
<vector><cn>4</cn> <cn>8</cn> <cn>12</cn> <cn>15</cn></vector>
<vector><cn>1</cn> <cn>5</cn> <cn>9</cn> <cn>13</cn> <cn>16</cn></vector>
<vector><cn>2</cn> <cn>6</cn> <cn>10</cn> <cn>14</cn></vector>
<vector><cn>3</cn> <cn>7</cn> <cn>11</cn></vector>
</matrix>

It's just a matter of what people need/want/can implement, etc.....

David

________________________________________________________________________
The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.

This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs. 
________________________________________________________________________
Received on Wednesday, 30 May 2007 14:01:40 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 20 February 2010 06:12:59 GMT