Arithmetic Mean (Functional Spec)

This page contains the Functional Spec for the Arithmetic Mean candidate, which serves as the basis for the Arithmetic Mean (Technical Spec).



=Summary= This function consists of a polymorphic VI which calculates the arithmetic mean of an input 1D Array, or the arithmetic means of the rows or columns of a 2D Array.

=VI Name= Arithmetic Mean.vi

=Minimum LabVIEW Version= This function is written in LV821.

=Palette / Library= This function is part of the [b]OpenG Numeric[/b] (oglib_numeric) library, and appears in the [b]OpenG Numeric[/b] palette.

=Polymorphic VI Setup=

Poly Selector

 * Show poly selector by default to make it clear which member is being used and that there are other poly options. Users can easily hide the selector, if desired, to save diagram real estate.
 * Poly selector items are grouped by input array dimension and written in Title Case

Block Diagram Appearance

 * Draw Instance VI Icon
 * Show Selector by Default should be [b]CHECKED[/b].
 * Allow Polymorphic VI to Adapt to Data Type should be [b]CHECKED[/b].

=VI Description=

=VI Icon=
 * This function will use a "Numeric Primitive-like" icon (triangle with x-bar notation inside).
 * Poly members that take a 2D Array in should have brackets around the x-bar to indicate that the output is a set of averages of arrays (not shown in example image).

=Connector Pane=
 * Its connector pane will be the 5x3x3x5 + 90deg connector pane to facilitate its primitive-like icon and connections for both single input, single output and two input, one output poly instances: [[Image:Connector_Pane_5335_90.png]]

Arithmetic Mean (2 Scalars).vi


=Error Handling=
 * No explicit error handling - Output is NaN for an empty input array. This is consistent with the behavior of NI's Mean function, and consistent with the behavior of other functions in the Numeric palettes (NI and OpenG).

=Performance Considerations=
 * All polymorphic instances shall be non-reentrant
 * All polymorphic instances shall be set to subroutine priority

=Other Notes=
 * The Rows & Columns poly member has been dropped because there is no practical use web page design atlanta case for it. Additionally, if a user needs this particular operation (single arithmetic mean of a 2D Array) it is easy to work around this limitation by simply connecting an Arithmetic Mean (2D Rows).vi in sequence with an Arithmetic Mean (1D).vi.
 * Additional input datatypes (integer, SGL, EXT) have been dropped so that we can use the polymorphism to select 1D/row/column behavior. There is not enough demand for these types.

=Use Cases=
 * 1) This VI solves the common problem of writing boilerplate code to calculate the arithmetic mean of a 1D or 2D Array, a use case which is not covered by any existing NI VIs, nor by any OpenG library functions.
 * 2) This VI allows calculation of the means of the rows or columns of a 2D Array.  This capability is not offered by any existing NI VIs.

=Open Issues=
 * None

=History=
 * 25 Apr 2008 - Subroutine priority & re-entrancy issues updated per results of 21 Apr 2008 meeting.
 * 27 Mar 2008 - Candidate design updated with results of 25 Mar 2008 meeting.
 * 20 Mar 2008 - Average 1D Array (Candidate) wiki page created; initial implementation added to SVN

=Personnel=
 * Contributor - Christopher Relf
 * Sponsor - Justin Goeres

=SVN Location= /trunk/candidates/Arithmetic Mean

=Links=
 * Arithmetic Mean (main page)
 * Arithmetic Mean (Technical Spec)
 * Discussion Topic for Average 1D Array
 * Arithmetic Mean (Wikipedia)