| Version 1.9 Build 2065
|
|
Next: Cone search functions
Up: Functions
Previous: Array functions operating in running windows
- bool ISDEFINED(anytype)
Return false if the value in the current row is undefined. Is
useful to test if a cell in a column with variable shaped arrays
contains an array. It can also be used to test if a field in a
record is defined.
- double NELEMENTS(anytype), double COUNT(anytype)
Return number of elements in an array (1 for a scalar).
- double NDIM(anytype)
Return dimensionality of an array (0 for a scalar).
- doublearray SHAPE(anytype)
Return shape of an array (returns an empty array for a scalar).
- double ROWNUMBER()
Return the row number being tested (first row is row number 0 or 1
depending on the style used).
In combination with function RAND it can, for instance,
be used to select arbitrary rows from a table.
- double ROWID()
Return the row number in the original table. This is especially
useful for returning the result of a selection of a subtable
of an AIPS++ measurement set
(see also sections Subqueries
and Examples).
- double RAND()
Return (per table row) a uniformly distributed random number
between 0 and 1 using a Multiplicative Linear Congruential Generator.
The seeds for the generator are deduced from the current date and
time, so the results are different from run to run.
The function can, for instance, be used to select a random
subset from a table.
- anytype IIF(cond,arg1,arg2)
This is a special funtion which operates like the ternary ?:
operator in C++.
If all arguments are scalars, the result is a scalar, otherwise
an array. In the latter case possible scalar arguments are
virtually expanded to arrays.
IIF evaluates the condition for each element. If True, it takes
the corresponding element of arg1, otherwise of arg2.
- anytypearray ARRAY(anytype,shape)
This function creates an array of the given type and shape.
The shape is given in the last argument(s).
It can be given in two ways:
- As a single set argument; for example, array(0,[3,4])
- As individual scalar arguments; for example, array(0,3,4)
The first argument gives the values the array is filled with.
It can be a scalar or an array of any shape. To initialize the
created array, the value array is flattened to a 1D array.
Its successive values are stored in the created array. If the
new array has more values than the value array, the value array is
reset to its beginning and the process continues.
Next: Cone search functions
Up: Functions
Previous: Array functions operating in running windows
Contents
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc.,
Washington, D.C.
Return to AIPS++ Home Page
2011-08-13