lookup values on array based on sequences More...

Functions

AFAPI array lookup (const array &in, const array &idx, const int dim=-1)
 Lookup the values of input array based on index. More...
 
AFAPI void copy (array &dst, const array &src, const index &idx0, const index &idx1=span, const index &idx2=span, const index &idx3=span)
 Copy the values of an input array based on index. More...
 
AFAPI af_err af_index (af_array *out, const af_array in, const unsigned ndims, const af_seq *const index)
 Lookup the values of input array based on sequences. More...
 
AFAPI af_err af_lookup (af_array *out, const af_array in, const af_array indices, const unsigned dim)
 Lookup the values of input array based on index. More...
 
AFAPI af_err af_index_gen (af_array *out, const af_array in, const dim_t ndims, const af_index_t *indices)
 Indexing an array using af_seq, or af_array. More...
 

Detailed Description

lookup values on array based on sequences

Function Documentation

AFAPI af_err af_index ( af_array out,
const af_array  in,
const unsigned  ndims,
const af_seq *const  index 
)

Lookup the values of input array based on sequences.

Parameters
[out]outoutput array containing values indexed by the sequences
[in]inis the input array
[in]ndimsis the number of sequences provided
[in]indexis an array of sequences
AFAPI af_err af_index_gen ( af_array out,
const af_array  in,
const dim_t  ndims,
const af_index_t indices 
)

Indexing an array using af_seq, or af_array.

Generalized indexing function that accepts either af_array or af_seq along a dimension to index the input array and create the corresponding output array

Parameters
[out]outoutput array containing values at indexed by the sequences
[in]inis the input array
[in]ndimsis the number of af_index_t provided
[in]indicesis an array of af_index_t objects
AFAPI af_err af_lookup ( af_array out,
const af_array  in,
const af_array  indices,
const unsigned  dim 
)

Lookup the values of input array based on index.

Parameters
[out]outoutput array containing values at locations specified by index
[in]inis input lookup array
[in]indicesis lookup indices
[in]dimspecifies the dimension for indexing
AFAPI void af::copy ( array dst,
const array src,
const index idx0,
const index idx1 = span,
const index idx2 = span,
const index idx3 = span 
)

Copy the values of an input array based on index.

Parameters
[out]dstThe destination array
[in]srcThe source array
[in]idx0The first index
[in]idx1The second index (defaults to af::span)
[in]idx2The third index (defaults to af::span)
[in]idx3The fourth index (defaults to af::span)
AFAPI array af::lookup ( const array in,
const array idx,
const int  dim = -1 
)

Lookup the values of input array based on index.

Parameters
[in]inis input lookup array
[in]idxis lookup indices
[in]dimspecifies the dimension for indexing
Returns
an array containing values at locations specified by index
Examples:
machine_learning/bagging.cpp, and machine_learning/naive_bayes.cpp.