|
The
AtomVect
module provides an object to represent Atom Vectors
(AV). These are arrays of double precision floating
point numbers. This module is implemented as a
Mapping and Numeric type.
The
AtomVect
module is located in the
Taro
node of the Yup
package. This module is imported by some variant
of:
from
Yup.Taro.AtomVect import *
An
"Entire" AV is created using the
AtomVector()
module function [New].
The function can be supplied with an Atom Map in
which case a "Mapped" AV is created; hence an
"Entire-Mapped" AV. If the function is not supplied
with an Atom Map, the created AV is still an
"Entire" AV, but it is now "Anonymous"; hence an
"Entire-Anonymous" AV.
An
"Entire-Mapped" AV can be subscripted
[Subscript]
which produces an "Extract" AV. Such AVs do not
have independent storage of their own but they
refer to the parent AV. An "Entire-Anonymous" AV
cannot be subscripted.
An
"Extract" AV can be formed from any type of
"Entire" AV using the Extract()
function, see the [Functions]
page. The result is an "Extract-Anonymous" AV even
if the parent is mapped.
Whether
"Entire" or "Extract", "Mapped" or "Anonymous", an
AV can be printed [Print]
and compared [Compare]
with another AV. Also operators, methods and
functions can be applied equally to all AVs
regardless of type. The only requirement is that of
conformability.
A
number of arithmetic operators are defined for AV
objects [Operators].
These operators take AVs as operands and return a
result that is an "Entire" AV. There are also
inplace versions of the binary
operators.
In
addition to data attributes [Data],
AV objects also have methods [Methods].
The methods operate on the AV object to which the
method is applied.
In
addition to the function to create new AVs, the
AtomVect
module defines several other functions
[Functions].
Functions generally do not modify AVs that are
supplied as arguments and they return results that
may be scalar, a new AV that is of different shape
or a new AV of the same shape.
The
C
API
should be documented in the Programming Manual but
is available from this page for now.
AVs
can be written to AV files or AVFs and read from
such files. AVFs may contain multiple records
[Files].
File functions do not discriminate between "Entire"
and "Extract" AVs.
|