Concepts
Matrix:
A rectangular block of numbers, texts, dates or booleans. Can be composed
by only one column or row, in
which case it is equivalent to a vector. It can be also composed by only
one cell, in which case it is equivalent to a single number, text, date or
boolean.
Matrex optimizes the calculations with matrices with only one
column, called vectors. Instead matrices with one row
are considered standard. Therefore using matrices with one column gives
better performances than using matrices with one row.
To obtain a vector
from a matrix with only one row, you need to use the transpose function.
The
contained cells are all of the same type (number, text, date or boolean),
so you can speak of numeric matrices, text
matrices, date matrices or boolean
matrices.
The content of a matrix should be homogeneous,
which means that all the contained cells contain the same kind of
information, like the values in a column of a database table.
Used in: Matrix Editor, Matrix
Viewer.
Base Matrix:
A matrix that has been created with the matrix
editor and therefore is not output of any function.
A base matrix can
be edited and manually changed, a calculated matrix cannot.
This
concept is very important in Matrex, because base matrices represent the
initial parameters of all the calculations in a project.
Function:
The equivalent of a function used in a spreadsheet formula.
Combines matrices to obtain matrices. If one of
the input matrices changes, the function is recalculated (exactly how it
happens in a spreadsheet).
Functions cannot contain composite formulas. It is anyway possible to
enter composite formulas in Matrex: the expression parser translates
formulas in a set of functions and intermediate matrices which are added
to the functions and matrices trees in the project.
Used in: Function Editor, Function
Viewer.
Parameters:
Some functions need some “non matrix” parameters. For example the “query”
function that queries the database and returns the result set as a set of
vectors, needs the SQL query text as parameter.
Tree:
Concept similar to the “files tree” that we are used to see in a file
system browser, like for example “Explorer” in Windows and “Nautilus” in
Linux. Instead of the files we have matrices, functions, presentations....
The absolute path of the “directory” containing an item is called the
package of the item, for example “/market/fonds/quotations”.
In
a tree you can add items, delete them, move them from one package to the
other, rename them and all the other operations you are used to in a file
system browser.
Used In: Trees.
Function Template:
When you add a function to a project, you need to
build it from a template. The template is in some way the “structure” of
the function, without data (the parameters and
the input and output matrices).
A template
specifies:
-
which kind of parameters and input and
output matrices the function needs to work (template
definitions)
-
the code that calculates the function (template code)
For example there is the “plus” function template for the sum of
matrices and the “average” template for the average of a matrix.
You
can add a template in your machine or in a Matrex
server, specifying parameters, input and output matrices definitions,
and the code that has to be executed to calculate the function. The code
can be written in Java (Matrex is also written in Java) or in a JVM
scripting language. For version 1.0 we chosen as scripting language
Jython.
Used in: Template Editor, Template
Tree.
Thread:
Is the unit of execution in which a function transforms its input matrices
to the output/result matrices. It can be executed in parallel with other
threads, in the same time.
Using threads can improve the overall
performance of the calculation, because complex functions are calculated
in the same time as other functions and don't get the control of the GUI
and in general of the whole system.
Timer:
Executes a function periodically.
Used for example to:
-
recalculate a database query function every 30 seconds, to capture the
changes in the queried tables content.
-
to generate random numbers that change periodically
Used in: Timer Editor
Presentation:
Very similar to the concept of spreadsheet, but only
used to show the data, not to change it. It is a big grid covered with
the matrices and texts you chosen to add to it, in
the foreground and background colors you want.
When a matrix changes
its content, the presentation shows the changes.
Used in: Presentation Editor,
Presentation Viewer.
Chart:
Equivalent to a chart in a spreadsheet application, gets some matrices as
input and shows them as a 2D (for vectorlike matrices) or 3D chart.
Used in: Multiseries Chart
Editor, Chart Viewer, Chart
Tree.
Project:
Set of matrices, functions, presentations, charts and timers used for
a common purpose. Matrex works by projects, which means that to work with
matrices, functions etc. you need to create a project that contains the
Used in: Main Window, Other
Menus.
Project item:
A matrix, function, presentation,
chart or timer.
Item:
A project item or a template.
In other words, anything that can be displayed in a tree
and can be edited in an editor.
Machine:
The application that actually calculates the functions.
Can
be a Matrex desktop application (called local) or
a Matrex server (from version 2.0), used by the
desktop applications (clients) to share projects.
When you open a project,
you open it in a specific machine and it is the machine that recalculates
its functions.
Used in: Main Window, Other
Menus.
Callback matrix:
A callback matrix is a matrix that is, directly or indirectly, both input
and output of the same function.
This is only
possible with special functions, also called callback,
that have a callback output matrix.
When the
function is calculated, the matrix is updated (because it is output of the
function) and for this reason it causes the function recalculation; which
again updates the matrix, which again causes the function recalculation
and so on.
The concept of callback function is equivalent to the one of recursive
function, since it continues to call itself until some conditions are
reached.
Used in: Function Editor.