- Main Page
- Tutorials
- Functions
- Release Notes
- Examples

col/cols
Complete List of ArrayFire Functions ArrayFire Functions by Category » Functions to create and modify Arrays » | Assignment & Indexing operation on arrays

Gets a reference of a col in a 2D af::array. More...

array::array_proxy | col (int index)
| Returns a reference to a col. More...
const array::array_proxy | col (int index) const
| Returns a reference to a col. More...
array::array_proxy | cols (int first, int last)
| Returns a reference to sequence of columns. More...
const array::array_proxy | cols (int first, int last) const
| Returns a reference to sequence of columns. More...

## Detailed Description

Gets a reference of a col in a 2D af::array.

This function returns a column or a set of columns from a two dimensional af::array. The reference can be used for indexing into and assignment of values to the af::array object.

## Function Documentation

array::array_proxy col | ( | int | index | ) |

Returns a reference to a col.

This function returns a column or a set of columns from a two dimensional af::array. The reference can be used for indexing into and assignment of values to the af::array object.

Parameters

  [in] | index | is the index of the col to be returned

Returns
  a reference to a col defined by `index`

Examples:
  helloworld.cpp, and integer.cpp.

const array::array_proxy col | ( | int | index | ) | const

Returns a reference to a col.

This function returns a column or a set of columns from a two dimensional af::array. The reference can be used for indexing into and assignment of values to the af::array object.

Parameters

  [in] | index | is the index of the col to be returned

Returns
  a reference to a col defined by `index`

array::array_proxy cols | ( | int | first,
|  | int | last
| ) |  |

Returns a reference to sequence of columns.

This function returns a column or a set of columns from a two dimensional af::array. The reference can be used for indexing into and assignment of values to the af::array object.

Parameters

  [in] | first | is the index of the columns to be returned
  [in] | last | is the index of the columns to be returned

Returns
  a reference to a set of columns

const array::array_proxy cols | ( | int | first,
|  | int | last
| ) |  | const

Returns a reference to sequence of columns.

This function returns a column or a set of columns from a two dimensional af::array. The reference can be used for indexing into and assignment of values to the af::array object.

Parameters

  [in] | first | is the index of the columns to be returned
  [in] | last | is the index of the columns to be returned

Returns
  a reference to a set of columns