Raw Data Markup Language - <RDML />

Draft, Proposal

Version: draft from 2010-08-09

Created: 2009-05-13/06-01 2009-06-26/07-05 2009-10-09/15 2009-10-26 2009-12-10/11 2010-04-19 2010-08-01 2010-08-04 2010-08-09

Comments and suggestions are welcome, email the author better sooner than later (please review before 2011-05-01):

Author: Dr. O. Hoffmann (German web-page)

Recent additions: Data interpolation processing with dataInterpolation - provides a simple mechanism to get automatically control points for cubic path interpolation for simple point data lists. And there is a sample script available for this interpolation method.
dataTransform contains now a function rev to reverse the order of data in all provided sets.

Index

(short index, the long index is available in the navigation, context or document information menu of the browser)

Author (send comments, suggestions!)
Introduction
Concept
General Structure
Common Attributes
Raw Data Elements
Data Processing
Data Interpretation and Presentation Elements
Samples
Formal Schema
References

Introduction

In scientific and technical publications there is often a requirement or desire to provide raw data for a reuse additionally to a graphical representation, which requires often transformed data with a special notation for example as path data within SVG, not usable anymore for the original application. Typically if raw data consists of different dimensions, those correspond to different units and the numbers, which differ in many orders of magnitude. Often there is a requirement to provide the precision or uncertainty of the provided data together with the data.
Therefore the authors either have to provide the raw data with a notation of the meaning of the data additionally to the graphical representation or they have to calculate the graphical representation from the raw data with the additional advantage to save time, file size and work, the last especially, if minor changes or corrections have to be applied to the raw data. Therefore there is a requirement too, to markup the relation between the raw data and the graphical representation as well.

Currently programs like grace at least conserve the raw data in the format specific files, however if the graphical representation is converted into SVG or another format, the relevant data are lost.
Distributed author groups, for example working on joint publications have often the need to exchange original data together with representations, both simple to change or to extent by all authors. Of course, a standard format for this purpose can help to save a lot of work and time, targetting one of the basic and original goals to exchange data using the internet, HTTP together with (X)HTML, SVG and other common formats instead of proprietary constructs.

Many data have a compact or meaningful appearance only in problem oriented coordinate systems. SVG currently provides only cartesian coordinates and cannot provide specific elements and path notations for any thinkable problem oriented coordinate system. Therefore it is desirable to be able to provide data in the problem oriented coordinate system together with a transformation into the system used for presentation.

Another application can be to provide a generic and simple way to specify more complex objects for SVG in a less space consuming way to extent SVG without the need to specify always another extension language for each new object. The current versions of SVG 1.1 and 1.2 tiny have only a small collection of graphical primitives. Typically the used elements represent something different or something more sophisticated than indicated by the element name or a group of objects represent a stand-alone entity with its own semantical expressable meaning.
Especially the presentation elements defined here can be seen as an approach to provide a semantically rich element selection to allow author a simpler access to create more complex and simpler identificable graphical entities within this large field of scientific and technical graphs.

Some authoring tools tend to modify path data on their own. To provide raw data separately as raw data simplifies the identification of data, that should never be changed by authoring tools or without having detailed knowledge of the provided data and its purpose. For specialised tools on the other hand optimisation can be simplified, if there are additional data containing information about error margins or uncertainties of the provided data.
Therefore it is desirable to separate data, where the data itself have an important meaning from the graphical presentation of data in path. Additionally the capability to transform such data before presentation simplifies the optimisation of data for presentation for authoring tools without changing the data, they do not understand themselves.

Concerning accessibility and understandability of information, different people or programs have different approaches to understand complex data. For many people explorable graphical representations of scientific or technical data like measurements or functional relations between entities help to understand the data. For others it is more or additional helpful to have access to the raw data to manipulate them, respectively their graphical representations themselves. This indicates, that it is a general and important accessibility feature for complex data and their graphical representation to be able to provide the raw data, the graphical representation and the manipulation of the raw data to gain the graphical presentation in a declarative way.

The Raw Data Markup Language RDML provides elements and attributes to markup the raw data and its meaning and to specify the relation how to generate the graphical representation using SVG. RDML can be seen as an extension of SVG as well as a standalone language to markup raw data in a meaningful way and it can be seen as a proposal for some new elements for SVG. Because all this is available with declarative methods as XML documents, it is simple for a user to modify the relations between the raw data and the graphical representation due to own criteria without the need for specific tools other than a simple text editor. However it is not excluded to use specific programs to create or to manipulate RDML documents or fragments as well.

Concept

RDML is an XML, therefore documents have to be at least well-formed. RDML has a simple structure, nevertheless it allows a large flexibility of data manipulation.

The namespace related to RDML is http://purl.oclc.org/net/hoffmann/rdml/ (Note, that this is a PURL; a redirect), the current address may change.
Therefore the namespace declaration may be something like: xmlns:r="http://purl.oclc.org/net/hoffmann/rdml/".

Concerning conditional processing in SVG, this PURL is used too as an indicator within the attribute requiredExtensions, if used as an extension.

RDML has four different types of elements. The first group is for the general structure and for meta information about the provided data. The second group is used to specify the data. The third group are the data processing elements used to extract, manipulate and to change data. The fourth group are the data interpretation elements to specify the interpretation respectively presentation of data in a graphical way.

The approach and structure of RDML is similar to SVG filters, but not processing graphical content already, but only typically much less data used to create graphical content.

Often attributes of RDML have whitespace separated lists as values. This includes a comma with optional whitespace before and after as separation as well and leading and trailing whitespace is removed, however leading or trailing comma are not allowed. A comma separates always two list items, even if one or both are empty values. Whitespace is what is considered in XML and SVG as whitespace including line breaks. This applies only to RDML specific attributes, not for attributes derived from other languages.

General Structure

The general structure elements are mainly intended to markup a standalone document and accept of the element data they are not required, if RDML is used within SVG, because SVG has corresponding own elements providing the corresponding functionality.

rdml

Description

Type: Element

This element corresponds to the root element of a standalone RDML document.

version

Description

Type: Attribute

Indicates the version of RDML used in the document. For this specification the value is "purl.oclc.org/net/hoffmann/rdml/#v1.0". If no such attribute or value is available, the 'current' version is assumed, indicated within the content of the URI for the namespace. To get a well defined content, authors are encouraged to set this attribute properly.

metadata

Description

Type: Meta element

This element contains meta information and can appear in each other document and may contain either plain text or meta information elements from other namespaces, for example the Literature Markup Language (LML) or RDF. This element corresponds to the element metadata from SVG.

title

Description

Type: Meta element

The title of a standalone document or the title of a fragment represented by another element. This element corresponds to the element title from SVG.

desc

Description

Type: Meta element

A description of a standalone document or the description of a fragment represented by another element. This element corresponds to the element desc from SVG.

The element may contain elements from other namespaces to structure the description, for example LML or XHTML.

m

Description

Type: Meta element

A generic meta information element within a metadata, title or desc to structure the information contained within the element. RDFa can be used to specify the semantic meaning of the meta information. Respectively the role of this element can be indicated with the attribute role.

The attributes from XLink can be used to provide some simple hyperlink functionality. m elements with hyperlink functionality should not contain other (m) elements with hyperlink functionality. A viewer can ignore the hyperlink functionality of all descendant (m) elements to avoid plurivalences, if the viewer cannot provide an advanced mechanism to clarify all plurivalences for the user. This functionality can be ignored too for the presentation of a title as a title of a window representing the complete element.
Only if xlink:href is specified, the element has a hyperlink functionality.
The values of xlink:show can be new | replace, this means, an activation either replaces the current document or the linked content is presented in a new viewport. Because this is related to meta information, new is assumed, if the attribute is not specified. The value of xlink:actuate is onRequest, this means, the link is processed with an interactive activation like clicking the hyperlink content.

Within title authors may use this typically to provide titles in different languages, no further substructure like subtitles. A viewer then may choose the best fitting language indicated with xml:lang. If presented as a title of a window representing the complete element, authors have to take into account, that for such a display no further substructure can be presented.

Within desc this element is mainly intended to markup paragraphs or sections of a structured description.

SVG has no such element, but allows explicitly elements from other namespaces within metadata. Within RDML standalone documents this can be used to structure meta information without using elements from other namespaces.

data

Description

Type: Element

A container element for data processing, presentation and interpretation elements. The interpretation and processing is only forward (in the source code). This means, processing and interpretation elements can only reference other processing elements results specified earlier in the source code, not later. At the end of processing of a data element a viewer only has to keep data in referencable presentation elements in memory. Other results from processing can be removed from memory to help the viewer with an effective memory management.

Within an SVG document the element data is not directly rendered. Results from processing and interpretation can only be referenced as presentation and interpretation elements to be displayed as graphical content.

Common Attributes

Some attributes are assumed to be available both in RDML and in the host language for any element, if another language is used as host language.

XML attributes

xmlns

Description

xmlns[:prefix] = "resource-name"

Standard XML attribute to identify an XML namespace. This attribute makes the related namespace available for the current element (and its children, if they are not related to another namespace).

Relations

Namespaces in XML

xml:id

Description

xml:id = "unique identifier"

Standard XML attribute for assigning a unique name to an element.

If the host language provides only its own identifier like id, this can be used too, but for RDML xml:id is preferred. In doubt both attributes can be noted with the same value.

Relations

xml:id Version 1.0

xml:lang

Description

xml:lang = "language identifier"

Standard XML attribute to specify the language (for example 'en' for english or 'de' for german) used in the contents and attribute values of particular elements.

If the host language provides only its own identifier like lang, this can be used too, but for RDML xml:lang is preferred. In doubt both attributes can be noted with the same value.

Relations

XML

xml:space

Description

xml:space = "default" | "preserve"

Standard XML attribute to specify whether whitespace is preserved in character data.

Note, that in the element dataRaw whitespace is preserved by default as well as in document (fragments), referenced with dataImport.

Relations

XML

xml:base

Description

xml:base = "base URI or IRI"

Standard XML attribute to specify a base URI other than the base URI of the document or external entity.

Relations

XML base

Attributes derived from XHTML or SVG

class

Description

class = "whitespace separated list of class names"

This attribute indicates membership in one or more sets. Multiple set names must be separated by whitespace characters. A class name may be shared by several element instances.

Relations

role

Description

role = "whitespace separated list of roles"

The attribute indicates one or more roles of an element. The role describes the role of the element, for example the semantical meaning. A role value may be shared by several element instances.

Unlike the class attribute, role attribute values are intended to be selected from a predefined set of values with specific semantic aspects. The values are either predefined by WAI-ARIA or by the default namespace (starting with ':') or by a (safe) CURIE.

Predefined values in RDML are the element names, for example ':dataRaw'. If role is available, for example element names from RDML can be used to indicate raw data related meta information.

Relations

XHTML role

datatype

Description

datatype = "CURIE"

Indicates, that the content of the element is in a machine readable format. The data type of this format is defined at the CURIE.

content

Description

content = "string"

The attributs contains alternative (text) content or is an alternative to provide text content. If the datatype for an element is specified and the element itself does not contain the data in a machine readable format, the value of this attribute is used instead and has to conform with the data type as specified by the attribute datatype.

about

Description

about = "URI or safe CURIE"

Indicates about what the content of the related element is with a CURIE, this is the so called 'subject'.

property

Description

property = "whitespace separated list of CURIEs"

Indicates the content of the element, respectively the target of about representing a value of the specified properties, this is the so called 'predicate'.

resource

Description

resource = "URI or safe CURIE"

Indicates the resource as (a not clickable) subject of the statement, a so called object.

typeof

Description

typeof = "whitespace separated list of CURIEs"

Indicates an association of the subject with types as specified by the CURIEs.

rel

Description

rel = "whitespace separated list of relations"

The attribute indicates one or more relations of an element. The rel attribute expresses the relationships between two resources. The relation is either a predefined value (with the XHTML vocabulary) or a CURIE.

rev

Description

rev = "whitespace separated list of reverse relations"

The attribute indicates one or more relations of an element. The rev attribute expresses the reverse relationships between two resources. The relation is either a predefined value (with the XHTML vocabulary) or a CURIE.

Relations

RDFa syntax

XLink attributes

Description

Type: Attribute

For some elements a simple hyperlink functionality is required. Is is provided with attributes from XLink. The following attributes are intended to have specific values for this type of link. If an attribute has only one possible value noted here, this is implied and there is no need to specify the attribute explicitly:

href
"URI"
the URI or IRI of the link target.
type
"simple"
title
"string"
a title for the arc of the hyperlink.
show
"other"
The link is used to import data or to reference a symbol.
For the element m the possible values are new | replace, see element description for details.
actuate
"other"
The data are imported, when the related element dataImport is processed. Respectively a symbol reused, when the related element is processed to present the data as symbols.
For the element m the value is onRequest, see element description for details.
role
"URI"
The role of the referenced resource, typically this is implied from the element, for example for dataImport to reference a document (fragment) indicating the role of the referenced data. Or if a symbol is referenced, the symbol represents a data point.
arcrole
"URI"
referencing a document (fragment) indicating the role of the arc of the hyperlink. Typically this is obvious from the element, it is used for - to import the data or to reuse a symbol - and needs no explicite explanation.

Raw Data Elements

Raw data in RDML are mainly numbers or in general simple strings, structured or separated with separators from each other. Additionally raw data can have multiple dimensions implied. To interprete raw data, separators and dimensions have to be specified for the further extraction, manipulation, presentation and interpretation of the data.

dataRaw

Description

Type: Element

This element contains exactly one set of raw data and maybe a metadata element as the first content (with optional whitespace before) with the description of the meaning of the raw data.

As any element within an XML language the dataRaw may contain comments, starting with <!-- and ending with -->. Everything between those strings is stripped, before the raw data are interpreted or processed. This means too, that all special XML characters have to be masked, if they appear within the data. The intention is not to provide a possibility to process arbitrary raw data, the data have at least to be modified in such a way that they are plain text and do not create conflicts with basic XML syntax.

Within an SVG document the element dataRaw is not directly rendered.

separator

Description

Type: Attribute

The attribute separator of the element dataRaw indicates, how two successive data are separated from each other. Possible values consist of:

s
The separator is exactly one whitespace character (including line breaks). Note, that in documents created on some operating systems more than one whitespace character is used to indicate a new line. This may result in unintended additional data.
w
The separator is none or more whitespace characters. If w appears alone, it is interpreted as ws
{*}
* represents a wildcard for the intended separator. The paranthesis { or } are excluded as parts of the separator.

Combinations are possible as well, for example ws indicates one or more whitespace charaters, w{,}w indicates ',' with optional leading and trailing whitespace as separator. The raw data set must start and end with a separator, especially possible content before the first separator and behind the last separator are not interpreted as data. However authors should not note decriptions outside of a possible metadata on top of dataRaw using this specific rule. Authors should avoid XML comments within the raw data between the first and the last separator as well to simplify the interpretation or processing of the data. Additionally authors should avoid content apart from maybe whitespace (if this is not used as separator themselves) after the last separator to simplify the interpretation of raw data by programs.

If the attribute is not provided, this is interpreted as if ws is specified. This means especially, that in this case the dataRaw content has to start and to end with at least one whitespace character.

dim

Description

Type: Attribute

The value is the number representing the primary dimension of the data set. It is a positive integer. Floating point numbers are rounded off, but numbers smaller than 1 are interpreted as 1 as well as content not interpretable as a number of if the attribute is not specified.

Often a data set has more than one dimension, for example two dimensions like x and y or time and length or angle and intensity. Or for example three dimensions like x, y and z or time, length and height etc.

The interpretation is, that the number represents the successive data representing the dimensions. For example for two, the odd data represent the first dimension, the even the second. Authors are encouraged to structure the data with line breaks, if this does not conflict with the separator indication.

The element dataExtract for extraction of data may indicate another number of dimensions. Those information takes precedence for extraction of course, not the value of the attribute dim of the element dataRaw. This is either only informative or is the fallback, if the dataExtract does not provide a dim.

dataImport

Description

Type: Element

Element to import data from external resources. It has the attributes separator, dim, archive, atype and ctype.

Additionally it has attributes from XLink to reference an external resource. This can be either another element dataRaw or it can be a plain text document with content as described for dataRaw. If for a referenced plain text document no other encoding information is available, the same as for the current document is assumed.

archive

Description

Type: Attribute

It is possible to put data files into an archive. This is mainly useful, if more than one data file is required for the same document. If the attribute is not provided or the value is empty, no archive is used. Else the resource indicated by the attributes from XLink is found within the archive indicated with the value of the archive attribute. This means relative paths are related to the root of the archive. If an absolute URI is indicated with the attributes from XLink, the archive attribute is ignored.

atype

Description

Type: Attribute

The archive type is indicated with the attribute atype. This information is only a hint to the user agent, if no other relyable or higher priority information (for example from a server) is available. If the attribute is not provided and no other information available, the keyword 'tar' is assumed. The value is a save CURIE for the archive type or one of the following keywords:

tar
a tar archive
tar.gz
a tar archive compressed with gzip
tar.bz2
a tar archive compressed with bzip2
zip
a zip archive

ctype

Description

Type: Attribute

If the imported file is compressed, this attribute provides a hint about the compression method. This information is only a hint to the user agent, if no other relyable or higher priority information (for example from a server) is available. If the attribute is not provided and no other information available, the keyword 'gz' is assumed. The value is a save CURIE for the archive type or one of the following keywords:

gz
compressed with gzip
bz2
compressed with bzip2
zip
compressed with zip

Data Processing

Data processing elements are used to extract or to manipulate or to change data. The resulting sets can be referenced using names provided in the attribute result by data processing or data presentation elements later in the source code and within the same element data.

Data extraction generates (one dimensional) sets of data from raw data, interpreting raw data with an information about the used separator and the dimension of the raw data.

For data processing, the input and the result are in general several sets, the number of sets can be called the number of dimensions. The processing either happens on each dimension or set separately or it happens on a data multiplet. The n-th data multiplet within a calculation uses from each set or dimension the n-th data. Therefore the data multiplet has exactly one data from each set in the order, the sets are provided.

dataExtract

Description

Type: Element

This element extracts data sets (dimensions) from an element dataRaw or dataImport.

result

Description

Type: Attribute

The value of this is a whitespaces separated list of names, to be used for referencing with data processing elements. The choice of names have the same restrictions as for an xml:id. It is unique within each element data. This means especially that a later result with the same name overwrites a previous result with the same name. The result from processing can be referenced by an attribute in.
The number and order of extracted sets is determined by the number and order of names within this attribute. If there are less names than dimensions to be extracted, the sets identificable with the last names remain empty concerning data extraction. A value '#' or '?' can be choosen to indicate a dimension, later not referencable. If there is exactly one name directly followed by a '#', for example result = "d#" this indicates, that the names are created automatically by adding numbers, starting with 1; for three dimensions the example is the same as specifying result = "d1 d2 d3".

in

Description

Type: Attribute

The value of this is a fragment identifier of an element dataRaw or dataImport and indicates from which data resource the data are extracted.

dim

Description

Type: Attribute

This attribute dim is already basically specified above.

If there are less data in the dataRaw or dataImport than specified dimensions, the missing data are assumed to be zero.

selectDim

Description

Type: Attribute

Defines the extracted dimensions. It is a whitespace separated list of the dimensions to be extracted in the given order. This means, these are integers. The first dimension is indicated with 1, the second with 2 and so on. There is no dimension 0. If selectDim specifies not existing dimensions, this results in one generated data zero for this new dimension. If not specified, 1 is assumed.

selectData

Description

Type: Attribute

Defines the data to be extracted. The value are zero, one or two integers and indicates the subset of the dimension to be extracted. The integers are separated with whitespace. Floating point numbers are rounded down, content not interpretable as numbers is interpreted as an empty value. An empty value or a not provided attribute means, that all data are extracted. The first number indicates the first data to be extracted, the second number the last data to be extracted. If there is no second number, the data are extracted to the end. Possibly missing data are assumed to be zero.
Note, that if more than one dimension is extracted, this applies to all dimensions to be extracted. If different ranges of data have to be extracted from different dimensions, this has to be done with more than one element dataExtract.

dataTransform

Description

Type: Element

With the element dataTransform data from other data processing elements, especially from an element dataExtract can be transformed.

result

Description

Type: Attribute

This attribute result is already basically specified above. It can be a whitespace separated list of results, for each in one. If there are less result items than in items, the missing results are not referencable. If there are more results than in items, the excessive results are assumed to be zero.

in

Description

Type: Attribute

The value of this is a whitespace separated list of the value list items of the attribute result of previous data processing elements.
Sometimes it might be convenient not to provide a set name, if for a calculation multiple sets are required. In this case the character '#' or '?' is used as a replacement. This is treated as a missing (empty) set.

calculate

Description

Type: Attribute

The value of this attribute is a whitespace separated list of calculation keywords with parameters in paranthesis. Whitespace within the paranthesis belongs to the parameters, not to the whitespace separation of the attribute list. Whitespace between a keyword and its parameters is not allowed. Unknown keywords or attribute values without a keyword are ignored. The parameters within the paranthesis are optional. Empty paranthesis mean the same as a keyword without paranthesis. Even if the specification of the keyword does not mention any parameters in paranthesis, they are allowed, but ignored. In general if more parameters are specified than required, excessive parameters are not used within the calculation. If a parameter is a simple string, the notation and the whitespace separation implicates, that some characters like whitespace or paranthesis cannot be using within such simple strings.

The calculations are applied either on sets or on data multiplets.
If the calculations are applied to sets, each set generates a new set as result, therefore the number of sets before and after the calculation are the same.
Calculations on data multiplets may change the number of dimensions and correlates data from different sets or dimensions.

For numeric calculations the data are interpreted as numbers in decimal notation as far as possible. Not interpretable characters stop the interpretation as number. If already the first character is not interpretable as a number, the interpretation of the character group representing one data stops and 0 is assumed. However, if the data starts with whitespace, the whitespace is ignored and the interpretation starts with the first none whitespace character. 0 is assumed too, if complete required sets are missing or single data are missing, if not specified otherwise.
Data sets may contain as well simple strings, typically for presentation or information purposes. Operations on strings do not require an interpretation as a number of course. Simple strings do not contain markup, but specific characters can or have to be masked, for example characters specific for XML.

Scientific notation for numbers is allowed too. As a separator for the exponent notation (integers) are accepted: E, e, D,d, for example: +2.34E-001, -.19d4, .47D17, 0000.321e7.
The following notations result in a specific processing as explained above, because not everything is interpretable as numbers, the resulting number is given after the '=':
abc5d12 = 0
5D2ebc = 5d2 = 500
2,2345 = 2
E+3 = 0
2.1E-1.762 = 2.1e-1 = 0.21 (because there are only integers after the E possible).

If more than one keyword is specified, the calulations are interpreted from right to left (for a writing direction from left to right, in general from the end of the attribute value to the begin). This means the calculation most right in the attribute value is applied to the data sets provided with the attribute in. The next calculation counted from the right is applied to the results of the previous calculation and so on. The results from the last, left calculation is referencable with the names within the attribute result. This processing corresponds to transformations in SVG. Note, that for some calculations the dimensions or number of sets change. This implicates restrictions on what can be calculated usefully within one list of keywords. This can be easily avoided by using more than one dataTransform element of course.

The keywords are as follows:

scale(*)
The data are multiplied with the numbers represented here as *. * is a whitespace separated list of numbers. Data from the first set are multiplied with the first number, data from the second set with the second number and so on.
If there are more numbers than dimensions, the excessive numbers are ignored. If there are less numbers than dimensions, the last number is multiplied to all further datas to allow authors a simple short notation, if many dimensions have to be scaled with the same number.
translate(*)
The data are added to the numbers represented here as *. * is a whitespace separated list of numbers. Data from the first set are added the first number, data from the second set to the second number and so on.
If there are more numbers than dimensions, the excessive numbers are ignored. If there are less numbers than dimensions, the last number is added to all further datas to allow authors a simple short notation, if many dimensions have to be translated with the same number.
rotate(*)
A rotation of the two first dimensions with an angle *. The angle can have a unit, to be provided without anything between the number and the unit. The unit can be deg, grad, rad or turns. deg is optional, this means, that angles without a unit are interpreted as deg. Angles with unknown units are assumed to be zero.
Angles can be specified as a fraction as well to avoid rounding errors in the notation of such fractions, for example: rotate(1/7turns), but for something like rotate(3/0turns) the '/0' is simply ignored, this is the same as rotate(3turns). Something like rotate(3/7/5turns) is not allowed and is interpreted as rotate(3/7) = rotate(3/7deg).
Let x be the first dimension, y the second, u the first result, v the second result, then it is:
u = cos(*) x - sin(*) y
v = sin(*) x + cos(*) y
Missing data for x or y are assumed to be zero.
If more than two sets are provided, the results for the others are the same as the input data.
m2(*)
A matrix multiplication of the two first dimensions is performed. * are up to four whitespace separated numbers, missing numbers are assumed to be 0, if they correspond to off diagonal matrix elements, for diagonal matrix elements they are assumed to be 1. If more than four numbers are provided, the excessive numbers are not used.
Let x1 be the first dimension, x2 the second, y1 the first result, y2 the second result, a11, a12, a21, a22 the four numbers, then it is:
y1 = a11*x1 + a12*x2
y2 = a21*x1 + a22*x2
Or in short notation: yi = aik xk
If more than two sets are provided, the results for the others are the same as the input data.
m3(*)
A matrix multiplication of the first three sets is performed. Missing dimensions are assumed to be zero. * are up to nine whitespace separated numbers, missing numbers are assumed to be 0, if they correspond to off diagonal matrix elements, for diagonal matrix elements they are assumed to be 1. If more than nine numbers are provided, the excessive numbers are not used.
Let x1 be the first dimension, x2 the second, x3 the third dimension, y1 the first result, y2 the second, y3 the third result, a11, a12, a13, a21, a22, a23, a31, a32, a33 the numbers in the order as specified, then it is:
y1 = a11*x1 + a12*x2 + a13*x3
y2 = a21*x1 + a22*x2 + a23*x3
y3 = a31*x1 + a32*x2 + a33*x3
Or in short notation: yi = aik xk
If more than three sets are provided, the results for the others are the same as the input data.
m4(*)
A matrix multiplication of the first four sets is performed. Missing dimensions are assumed to be zero. * are up to sixteen whitespace separated numbers, missing numbers are assumed to be 0, if they correspond to off diagonal matrix elements, for diagonal matrix elements they are assumed to be 1. If more than sixteen numbers are provided, the excessive numbers are not used.
Let x1 be the first dimension, x2 the second, x3 the third, x4 the fourth dimension, y1 the first result, y2 the second, y3 the third result and y4 the fourth result, a11, a12, a13, a14, a21, a22, a23, a24, a31, a32, a33, a34, a41, a42, a43, a44 the numbers in the order as specified, then it is:
y1 = a11*x1 + a12*x2 + a13*x3 + a14*x4
y2 = a21*x1 + a22*x2 + a23*x3 + a24*x4
y3 = a31*x1 + a32*x2 + a33*x3 + a34*x4
y4 = a41*x1 + a42*x2 + a43*x3 + a44*x4
Or in short notation: yi = aik xk
If more than four sets are provided, the results for the others are the same as the input data.
mn(*)
A matrix multiplication is performed. * are whitespace separated numbers. The first number indicates the number of dimensions. It is interpreted as positive integer, floating point numbers are rounded down, numbers smaller than 1 and something not interpretable as a number is interpreted as 1.
Missing dimensions are assumed to be zero. Missing numbers are assumed to be 0, if they correspond to off diagonal matrix elements, for diagonal matrix elements they are assumed to be 1. If more than necessary numbers are provided, the excessive numbers are not used.
The interpretation of the numbers following on the first number corresponds to what is noted for 3 or 4 dimensions, the processing of the n x n matrix as well. This means mn(4 *) has the same result as m4(*), mn(3 *) has the same result as m3(*), mn(2 *) has the same result as m2(*).
Or in short notation with xk the input sets, yi the results and aik the matrix elements: yi = aik xk
If more than indicated sets are provided, the results for the others are the same as the input data.
power(*)
A power or exponentiation of all provided sets is calculated. * represents a whitespace separated list of zero to two numbers (the first can be a simple string like NANQ as well).
The first number or string is used as an indicator or fallback for a not computable combination. The second number indicates the exponent. If x is one of the sets provided by one item of in and u the related item of result, the first number of * is p, the second is q, the operation is:
u = xq if this results in a real number, if not, then u = p.
If p is not provided, 0 is assumed. If q is not provided or not interpretable as number, 1 is assumed.
exp(*)
A power or exponentiation with all provided sets is calculated. * represents a whitespace separated list of zero to two numbers (the first can be a simple string like NANQ as well).
The first number or string is used as an indicator or fallback for a not computable combination. The second number indicates the base. If x is one of the sets provided by one item of in and u the related item of result, the first number of * is p, the second is q, the operation is:
u = qx if this results in a real number, if not, then u = p.
If p is not provided, 0 is assumed. If q is not provided or not interpretable as number, e (base of the natural logarithm) is assumed.
pow(*)
A power or exponentiation for the two first sets is calculated. * represents one number or simple string.
If x is the first of the sets, y the second, * is p, the operation is:
u = xy if this results in a real number, if not, then u = p.
If data for x or y are missing, the last provided data from the related set is used.
If x or y are not provided or interpretable as a number, 1 is assumed. If p is not provided, 0 is assumed.
log(*)
The logarithm of all sets is calculated. * represents a whitespace separated list of zero to two numbers (the first can be a simple string like NANQ as well).
If x is one of the sets provided by one item of in and u the related item of result, the first number of * is f a fallback, the second is b the base, the operation is:
u = logb (x) if this results in a real number, if not, then u = f.
If b is not provided or interpretable as number, e (base of the natural logarithm) is assumed. If f is not provided, 0 is assumed.
lob(*)
The logarithm of all sets is calculated. * represents a whitespace separated list of zero to two numbers (the first can be a simple string like NANQ as well).
If x is one of the sets provided by one item of in and u the related item of result, the first number of * is f a fallback, the second is a the argument, the operation is:
u = logx (a) if this results in a real number, if not, then u = f.
If a is not provided or interpretable as number, 0 is assumed. If f is not provided or not interpretable as number, 0 is assumed.
los(*)
A logarithm for the two first sets is calculated. * represents one numbers or simple string.
If x is the first of the sets, y the second, * is p, the operation is:
u = logy (x) if this results in a real number, if not, then u = p.
If y is not provided or interpretable as a number, e (base of the natural logarithm) is assumed. If p is not provided or not interpretable as number, 0 is assumed.
setdist(*)
A distance or length is calculated for all provided sets. * represents a number, if there is a list, only the first item is interpreted. If not interpretable as a number or not specified, 2 is assumed. If x is one of the sets provided by one item of in and u the related item of result and * is p, the operation is as follows:
The sum over the complete set is taken over the p-th power of the absolute value of each data. From this sum the p-th root is taken.
For example, if p is 2, this corresponds to an Euclidian distance. If p is 1 this corresponds to the sum over all absolute values, called sometimes the Manhattan distance.
For n sets this results in n results, each with one data as result.
setmax
The maximum of each set is determined, for n sets this results in n results, each with one data as result.
setmin
The minimum of each set is determined, for n sets this results in n results, each with one data as result.
setav
The averages are calculated for the provided sets. This means, the sum over all data in one set is devided by the number of data per set (what can be different for each set). For n sets this results in n results, each with one data as result.
setsum
The sums are calculated for the provided sets. This means, the sum over all data in one set. For n sets this results in n results, each with one data as result.
setmult
The products are calculated for the provided sets. This means, the product over all data in one set. For n sets this results in n results, each with one