Getting Started | Documentation | Glish | Learn More | Programming | Contact Us |
Version 1.9 Build 1556 |
|
Package | utility | |
Module | functionals | |
Tool | functionalserver |
name | in | name of functional to create | |
Allowed: | string | ||
Default: | unset | ||
order | in | order if appropriate | |
Allowed: | integer | ||
Default: | depending on functional | ||
params | in | parameters | |
Allowed: | numeric array | ||
Default: | depending on functional |
Create the named functional. If an order is specified it is used, otherwise the default functional is created with the specified (or default) parameters. Naming is minimum-match, case insensitive. See the separate combine, compound and compiled descriptions for more information on these special cases.
Name | Order | Default order | Default parameters |
gaussian1d | - | - | [1 0 1] |
gaussian2d | - | - | [1 0 0 1 1 0] |
gaussian3d | - | - | [1 0 0 0 1 1 1 0 0] |
gaussianNd | y | 2 | [0.159155 0 0 1 1 0] (note height) |
hyperplane | y | 0 | [0] |
polynomial | y | 0 | [0] (see separate poly) |
evenpolynomial | y | 0 | [0] |
odd polynomial | y | 0 | [0] |
sinusoid1d | - | - | [1 1 0] |
chebyshev | y | 0 | [0] |
butterworth | - | 0 | [0] |
combine | - | - | [] (all 1 after adds) |
compound | - | - | [] (copied from added functions) |
compiled | y | - | [...] (a list of zeroes: see separate compiled) |
A created functional (or /em function for short, but be aware of possible Glish terminology clashes) will have a set of basic methods, which are described in the functional tool.
- a:=dfs.functional('poly', 2, [1,2,3]) # create a polynomial - a.f([0,1,2]) # get some values [1 6 17] - a.fdf([0,1,2]) # get values and derivatives [[1:3,] 1 1 0 0 6 1 1 1 17 1 2 4] - b:=dfs.functional('combi') # a combine - b.add(a) # with the polynomial T - b.f([0,1,2]) # values are same [1 6 17] - b.add(b) # add again T - b.f([0,1,2]) # as expected from the combination [2 12 34]