- From: ak.miller at auckland.ac.nz (Andrew Miller)
- Subject: [cellml-dev] Math and Cellml
- Date: Thu, 20 Jan 2011 09:03:24 +1300
On 20/01/11 05:34, Paolo Pannarale wrote:
>
Dear Dr. Miller I'm developing an application using the cellml api. I'm
>
facing some issues about dealing with math elements...
>
I need to read the math elements and their structure and to create new
>
ones...but I couldn't find any documentation about.
>
Do you have any suggestion about how to proceed, any programming
>
examples or documentation?
>
I couldn't find the doxygen documentation usefull nor any discussion in
>
the tracker.
Hi Paolo,
The CellML API implements the MathML DOM, which is defined externally;
you may find the specification useful to describe what each operation
and attribute does:
http://www.w3.org/TR/MathML2/appendixd.html
The mapping between the IDL specification provided by W3C and the way it
is used in C++ code is the same as the mapping used for the rest of the
CellML API.
Note that the MathML API is built on top of the DOM API - things like
creating elements are done using the DOM API. See
http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html for
the specification of the DOM.
Once you have a CellML Element, there is a CellML specific API for
creating the outer <math> element and adding it to the model - from
there you can use the standard MathML and DOM APIs.
From:
http://cellml-api.hg.sf.net/hgweb/cellml-api/cellml-api/raw-file/default/interfaces/CellML_APISPEC.idl
On Model:
/**
* Creates a new MathMLMathElement.
* @return The new MathML math element.
*/
mathml_dom::MathMLMathElement createMathElement();
MathContainer supports addMath, removeMath, replaceMath, as well as
obtaining a MathList to enumerate the maths. CellMLComponent and Role
both extend MathContainer; from C++, you can just use those operations
after obtaining a CellMLComponent or Role.
Best wishes,
Andrew
>
Best regards, Paolo Pannarale
>
>
--
>
?[M]y work, which I?ve done for a long time, was not pursued in order
>
to gain the praise I now enjoy, but chiefly from a craving after
>
knowledge, which I notice resides in me more than in most other
>
men. And wherewithal, whenever I found out anything remarkable, I have
>
thought it my duty to put down my discovery on paper, so that all
>
ingenious people might be informed thereof.?
>
(van Leeuwenhoek, Letter to the Royal Society, June 12 1716)
>
>
?Make it as simple as possible. But not simpler?.
>
(Albert Einstein)
>
>
"The best way to predict the future is to invent it".
>
(Alan Kay)
>
>
___________________________________
>
>
Questo documento ? indirizzato esclusivamente al destinatario.
>
Tutte le informazioni ivi contenute, compresi eventuali allegati,
>
sono soggette a riservatezza secondo i termini del D.Lgs. 196/2003
>
in materia di "privacy" e ne ? proibito l'utilizzo da parte di
>
altri soggetti. Se avesse ricevuto per errore questo messaggio,
>
La preghiamo cortesemente di contattare il mittente al pi? presto
>
e di cancellare il messaggio subito dopo. Grazie.
>
----
>
This document is exclusively intended for the stated addressee.
>
All information therein, including any attachment, are reserved
>
as per Italian D.Lgs. 196/2003 about privacy, and cannot be used
>
by third parties. In case you received this message by mistake,
>
please inform the sender and delete the message afterward.
>
Thank you.
- [cellml-dev] Math and Cellml, Andrew Miller, 01/20/2011
Archive powered by MHonArc 2.6.18.