Maple Professional
Maple Academic
Maple Student Edition
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professional
MapleSim Academic
Maple T.A. - Testing & Assessment
Maple T.A. MAA Placement Test Suite
Möbius - Online Courseware
Machine Design / Industrial Automation
Aerospace
Vehicle Engineering
Robotics
Power Industries
System Simulation and Analysis
Model development for HIL
Plant Modeling for Control Design
Robotics/Motion Control/Mechatronics
Other Application Areas
Mathematics Education
Engineering Education
High Schools & Two-Year Colleges
Testing & Assessment
Students
Financial Modeling
Operations Research
High Performance Computing
Physics
Live Webinars
Recorded Webinars
Upcoming Events
MaplePrimes
Maplesoft Blog
Maplesoft Membership
Maple Ambassador Program
MapleCloud
Technical Whitepapers
E-Mail Newsletters
Maple Books
Math Matters
Application Center
MapleSim Model Gallery
User Case Studies
Exploring Engineering Fundamentals
Teaching Concepts with Maple
Maplesoft Welcome Center
Teacher Resource Center
Student Help Center
evalhf/array - handling of arrays
Description
evalhf handles only two special structures: arrays and rtables. This help page describes arrays, and rtables with their datatype option set to something other than float[8] and complex[8]. The rtable structure, which is a supertype of Array, Matrix, Vector, and hfarray are described in evalhf/hfarray.
Arrays passed as parameters to evalhf should have all their entries evaluating to floats or unassigned.
Unassigned array entries are treated as 0 by evalhf.
In general, evalhf can pass arrays downwards (to its called routines). These arrays can be modified and returned as function values, but cannot be returned as function values at the top level.
We distinguish two levels of interaction for arrays: (a) top-level, first call to evalhf and (b) function-to-function within an evalhf call. Thus
(a) ; ; ;
(b) proc ; ; end proc; ;
This distinction has to be made because at the top level, arrays are converted to hardware floats, something which is not necessary in between internal evalhf calls. This conversion is expensive and should be used judiciously.
Arrays within evalhf are passed by reference, and hence can be modified by any sub-function which uses them.
Arrays at the top level (a) are normally passed by value. By using the var(array) construct, arrays are passed by value and result, being converted into hardware floats and after evaluation, converted back.
The function array(...) is valid inside evalhf calls and accepts dimension information only. The result is an array of the given dimensions initialized to all zeros. No indexing or initializing information can be given to the function array.
Indexing functions are not handled by evalhf.
There is no mechanism, within evalhf, to find the dimension of an array from the object itself.
Global arrays or global array references are not permitted within evalhf.
See Also
evalhf/var
Download Help Document