Documentation>C API
array.h File Reference

Array. More...

#include "generic.h"

Data Structures

struct  VlArray
 Numeric array. More...
 

Macros

#define VL_ARRAY_MAX_NUM_DIMENSIONS   16
 Maximum number of array dimensions.
 

Functions

Get data and parameters
vl_size vl_array_get_num_dimensions (VlArray const *self)
 Get number of dimensions. More...
 
vl_size const * vl_array_get_dimensions (VlArray const *self)
 Get dimensions. More...
 
void * vl_array_get_data (VlArray const *self)
 Get data. More...
 
vl_type vl_array_get_data_type (VlArray const *self)
 Get type. More...
 
vl_size vl_array_get_num_elements (VlArray const *self)
 Get number of elements in array. More...
 
Constructing and destroying
VlArrayvl_array_init (VlArray *self, vl_type type, vl_size numDimension, vl_size const *dimensions)
 New numeric array. More...
 
VlArrayvl_array_init_envelope (VlArray *self, void *data, vl_type type, vl_size numDimension, vl_size const *dimensions)
 New numeric array envelope. More...
 
VlArrayvl_array_init_matrix (VlArray *self, vl_type type, vl_size numRows, vl_size numColumns)
 New numeric array with matrix shape. More...
 
VlArrayvl_array_init_matrix_envelope (VlArray *self, void *data, vl_type type, vl_size numRows, vl_size numColumns)
 New numeric array envelpe with matrix shape. More...
 
VlArrayvl_array_new (vl_type type, vl_size numDimension, vl_size const *dimensions)
 New numeric array. More...
 
VlArrayvl_array_new_envelope (void *data, vl_type type, vl_size numDimension, vl_size const *dimensions)
 New numeric array envelope. More...
 
VlArrayvl_array_new_matrix (vl_type type, vl_size numRows, vl_size numColumns)
 New numeric array with matrix shape. More...
 
VlArrayvl_array_new_matrix_envelope (void *data, vl_type type, vl_size numRows, vl_size numColumns)
 New numeric array envelpe with matrix shape. More...
 
void vl_array_dealloc (VlArray *self)
 Delete array. More...
 
void vl_array_delete (VlArray *self)
 Delete array. More...
 

Detailed Description

Array - Definition.

Author
Andrea Vedaldi

Function Documentation

◆ vl_array_dealloc()

void vl_array_dealloc ( VlArray self)
Parameters
selfarray.

◆ vl_array_delete()

void vl_array_delete ( VlArray self)
Parameters
selfarray.

◆ vl_array_get_data()

void* vl_array_get_data ( VlArray const *  self)
inline
Parameters
selfarray.
Returns
data.

◆ vl_array_get_data_type()

vl_type vl_array_get_data_type ( VlArray const *  self)
inline
Parameters
selfarray.
Returns
type.

◆ vl_array_get_dimensions()

vl_size const* vl_array_get_dimensions ( VlArray const *  self)
inline
Parameters
selfarray.
Returns
dimensions.

◆ vl_array_get_num_dimensions()

vl_size vl_array_get_num_dimensions ( VlArray const *  self)
inline
Parameters
selfarray.
Returns
number of dimensions.

◆ vl_array_get_num_elements()

vl_size vl_array_get_num_elements ( VlArray const *  self)
Parameters
selfarray.
Returns
number of elements.

◆ vl_array_init()

VlArray* vl_array_init ( VlArray self,
vl_type  type,
vl_size  numDimensions,
vl_size const *  dimensions 
)
Parameters
selfarray to initialize.
typedata type.
numDimensionsnumber of dimensions.
dimensionsdimensions.

The function initializes the specified array and allocates the necessary memory for storage.

◆ vl_array_init_envelope()

VlArray* vl_array_init_envelope ( VlArray self,
void *  data,
vl_type  type,
vl_size  numDimensions,
vl_size const *  dimensions 
)
Parameters
selfarray to initialize.
datadata to envelople.
typedata type.
numDimensionsnumber of dimensions.
dimensionsdimensions.

The function initializes the specified array wrapping the specified buffer.

◆ vl_array_init_matrix()

VlArray* vl_array_init_matrix ( VlArray self,
vl_type  type,
vl_size  numRows,
vl_size  numColumns 
)
Parameters
selfarray to initialize.
typetype.
numRowsnumber of rows.
numColumnsnumber of columns.

◆ vl_array_init_matrix_envelope()

VlArray* vl_array_init_matrix_envelope ( VlArray self,
void *  data,
vl_type  type,
vl_size  numRows,
vl_size  numColumns 
)
Parameters
selfarray to initialize.
datadata to envelope.
typetype.
numRowsnumber of rows.
numColumnsnumber of columns.

◆ vl_array_new()

VlArray* vl_array_new ( vl_type  type,
vl_size  numDimensions,
vl_size const *  dimensions 
)
Parameters
typedata type.
numDimensionsnumber of dimensions.
dimensionsdimensions.

The function creates a new VLArray instance and allocates the necessary memory for storage.

◆ vl_array_new_envelope()

VlArray* vl_array_new_envelope ( void *  data,
vl_type  type,
vl_size  numDimensions,
vl_size const *  dimensions 
)
Parameters
datadata to envelople.
typedata type.
numDimensionsnumber of dimensions.
dimensionsdimensions.

◆ vl_array_new_matrix()

VlArray* vl_array_new_matrix ( vl_type  type,
vl_size  numRows,
vl_size  numColumns 
)
Parameters
typetype.
numRowsnumber of rows.
numColumnsnumber of columns.

◆ vl_array_new_matrix_envelope()

VlArray* vl_array_new_matrix_envelope ( void *  data,
vl_type  type,
vl_size  numRows,
vl_size  numColumns 
)
Parameters
datadata to envelope.
typetype.
numRowsnumber of rows.
numColumnsnumber of columns.