The Mathematic_Vector Class is used to describe a Mathematic Vector in the CÆSAR Code Package. A Mathematic_Vector differs from a Distributed_Vector in several ways:
The Mathematic_Vector methods section describes the methods used in the Mathematic_Vector Class.
Mathematic_Vector public procedures:
| Fundamental procedures | |||
| Initialize | Initializes a Mathematic_Vector object. | ||
| Finalize | Finalizes a Mathematic_Vector object. | ||
| Valid_State | Returns false iff a Mathematic_Vector object is in an invalid state. | ||
| Initialized | Returns true iff a Mathematic_Vector object has been initialized. | ||
| Operations | |||
| Average | Returns the arithmetic mean of the Mathematic_Vector object. | ||
| Add_Values | Increments the values of a Mathematic_Vector object. | ||
| DotProduct | Returns the global dot product of two Mathematic_Vector objects. | ||
| Duplicate | Makes an exact copy of a Mathematic_Vector (except for the internal DV's and OV's, which will be generated if needed). This procedure is also useful when a compatible Mathematic_Vector is needed. | ||
| First_PE | Returns the global number of the first entry on this PE of the Mathematic_Vector object. | ||
| Get_Values | Returns the values for a Mathematic_Vector object (also has an assignment interface). | ||
| Infinity_Norm | Returns the infinity norm of the Mathematic_Vector object. | ||
| Last_PE | Returns the global number of the last entry on this PE of the Mathematic_Vector object. | ||
| Length_PE | Returns the length on this PE of the Mathematic_Vector object. | ||
| Length_Total | Returns the total length (all PEs) of the Mathematic_Vector object. | ||
| Locus | Returns the locus of the Mathematic_Vector object. | ||
| Maximum | Returns the maximum of the Mathematic_Vector object. | ||
| Mean | Returns the mean value of the Mathematic_Vector object. | ||
| Minimum | Returns the minimum of the Mathematic_Vector object. | ||
| Name | Returns the name of the Mathematic_Vector object. | ||
| Norm | Returns the two norm of the Mathematic_Vector object. | ||
| One_Norm | Returns the one norm of the Mathematic_Vector object. | ||
| Orthogonal | Returns true if the two Mathematic_Vector objects are orthogonal. | ||
| Output | Writes out the Mathematic_Vector object. | ||
| P_Norm | Returns the P-norm of the Mathematic_Vector object. | ||
| Two_Norm | Returns the two norm of the Mathematic_Vector object. | ||
| Set_Not_Up_to_Date | Puts a Mathematic Vector into a ``not up-to-date'' state. Can be used externally to force recalculation of norms, extrema, etc. | ||
| Set_Value | Sets all values to a specified scalar (often zero) for a Mathematic_Vector object. | ||
| Set_Values | Sets the values for a Mathematic_Vector object. | ||
| Sum | Returns the sum of the Mathematic_Vector object. | ||
| Total | Returns the sum of the Mathematic_Vector object. | ||
| Update_DV | Updates the Distributed Vector inside of a Mathematic_Vector object. | ||
Mathematic_Vector public defined types:
| Mathematic_Vector type | |||
| Average | Global average of the Mathematic Vector. | ||
| Average_is_Updated | Updated? toggle for Average. | ||
| Dimensionality | Number of dimensions for the Mathematic Vector (always unity). | ||
| DV | Distributed Vector that is used for matvecs. | ||
| Infinity_Norm | Infinity norm of the Mathematic Vector. | ||
| Infinity_Norm_is_Updated | Updated? toggle for Infinity_Norm. | ||
| Initialized | Initialization status. | ||
| Maximum | Global maximum of the Mathematic Vector. | ||
| Maximum_is_Updated | Updated? toggle for Maximum. | ||
| Minimum | Global minimum of the Mathematic Vector. | ||
| Minimum_is_Updated | Updated? toggle for Minimum. | ||
| Name | The name for this variable (especially useful in a vector of Mathematic Vectors). | ||
| One_Norm | One norm of the Mathematic Vector. | ||
| One_Norm_is_Updated | Updated? toggle for One_Norm. | ||
| OV | A vector of Overlapped Vectors that is used for matvecs. | ||
| DV_is_Updated | Updated? toggle for DV. | ||
| P_Norm | P norm of the Mathematic Vector. | ||
| P_Norm_Exponent | Exponent used in taking the P norm. | ||
| P_Norm_is_Updated | Updated? toggle for P_Norm. | ||
| Structure | Basic data structure for the Mathematic Vector. | ||
| Sum | Global sum of the Mathematic Vector. | ||
| Sum_is_Updated | Updated? toggle for Sum. | ||
| Two_Norm | Two norm of the Mathematic Vector. | ||
| Two_Norm_is_Updated | Updated? toggle for Two_Norm. | ||
| Values | Values for the Mathematic Vector. | ||
Mathematic_Vector public variables:
| Number_of_OVs_in_an_MV | A parameter specifying the number of Overlapped_Vector objects in a Mathematic_Vector object. This number limits the number of different matrices that MatVecs can be done with quickly. For example, if a Mathematic_Vector object is to be multipied by three matrices, all with the same Column_Structure but with different Data_Indices (Columns arrays), then the set up for all three can be stored as long as Number_of_OVs_in_an_MV is equal to or greater than three. Otherwise, multiplication can still be done, but set up phases will have to be repeated. |
The Mathematic_Vector Class code listing contains additional documentation. The Mathematic_Vector Class also contains a Unit Test Program.