IBM Visualization Data Explorer Programmer's Reference

[ Bottom of Page | Previous Page | Next Page | Table of Contents | Partial Table of Contents | Index ]

DXArrayConvert, DXArrayConvertV

Function Creates a new Array of specified type, category, rank, and shape from an existing Array.

Syntax


#include <dx/dx.h>
Array DXArrayConvert(Array a, Type t, Category c, int rank, ...)
Array DXArrayConvertV(Array a, Type t, Category c, int rank, int *shape)

.

Functional Details The routine copies Array a and converts it to type t, category c, rank rank, and a specified shape. (The new Array can be deleted with DXDelete. See 4.2 , "Memory Management".)

Conversion requires that the parameters of the newly created Array be compatible with those of the Array from which it was copied. For example, the new rank and shape are compatible with the rank and shape of a if they differ only by dimensions that have a shape of 1. Thus an Array of 1 × n matrices can be converted to an Array of vectors. Table 2 and Table 3 summarize the convertibility of the different types and categories.

Table 2. Summary of Type Conversions
   
Byte
Unsigned Byte  
Short
Unsigned Short  
Int
Unsigned Int  
Float
 
Double
Byte A CNS A CNS A CNS A A
Unsigned Byte CNS A A A A A A A
Short CNS CNS A CNS A CNS A A
Unsigned Short CNS CNS CNS A A A A A
Int CNS CNS CNS CNS A CNS A A
Unsigned Int CNS CNS CNS CNS CNS A A A
Float CNS CNS CNS CNS CNS CNS A A
Double CNS CNS CNS CNS CNS CNS CNS A
Notes:
CNS = Conversion not supported
A = ANSI 'C' type-conversion semantics

Table 3. Summary of Category Conversions
  Real Complex
Real Conversion Conversion
Complex CNS Conversion
Notes:
CNS = Conversion not supported
Real->Complex: a -> a + 0i

Return Value Returns a new Array or returns NULL and sets an error code.

See Also DXExtractFloat, DXExtractInteger, DXExtractNthString, DXExtractParameter, DXExtractString, DXQueryArrayCommon, DXQueryArrayCommonV, DXQueryArrayConvert, DXQueryArrayConvertV, DXQueryParameter

12.8 , "Extracting Module Parameters".


[ Top of Page | Previous Page | Next Page | Table of Contents | Partial Table of Contents | Index ]
[Data Explorer Documentation | QuickStart Guide | User's Guide | User's Reference | Programmer's Reference | Installation and Configuration Guide ]

[Data Explorer Home Page | Contact Data Explorer | Same document on Data Explorer Home Page ]


[IBM Home Page | Order | Search | Contact IBM | Legal ]