Functions | |
array | T () const |
Transpose matrix or vector. | |
array | H () const |
Conjugate transpose (i.e. | |
array | lower (const array &input, int diagonal=0) |
Extract lower triangular matrix. | |
array | upper (const array &input, int diagonal=0) |
Extract upper triangular matrix. | |
array | diagonal (const array &input, int diag=0) |
Extract or form diagonal matrix. | |
array | join (const array &A, const array &B, int dim=0) |
Join two arrays along dimension dim . | |
array | newdims (const array &input, const dim4 &newdims) |
Adjust the dimensions of an N-D array (fast). | |
array | newdims (const array &input, int dim0, int dim1=1, int dim2=1, int dim3=1) |
Adjust the dimensions of an N-D array (fast). | |
array | flipv (const array &in) |
Flip matrix vertically. | |
array | fliph (const array &in) |
Flip matrix vertically. | |
array | flipdim (const array &in, unsigned dim) |
Flip array along a given dimension. | |
array | tile (const array &A, unsigned d0, unsigned d1=1, unsigned d2=1) |
tile (repeat) array along specified dimensions | |
array | tile (const array &A, const dim4 &dims) |
tile (repeat) array along specified dimensions | |
array | flat (const array &A) |
Flatten an array into column vector. | |
array | shift (const array &in, int dim0=0, int dim1=0, int dim2=0, int dim3=0) |
Shift the values of an array around dimension (wrap around). | |
array | shift (const array &in, const array &shift) |
Shift the values of an array around dimension (wrap around). | |
array | reorder (const array &in, int dim0=-1, int dim1=-1, int dim2=-1, int dim3=-1) |
Reorder dimensions of array. |
array T | ( | ) | const [inherited] |
Transpose matrix or vector.
X = 0.5434 -1.4913 0.1374 -0.7168 1.4805 -1.2208 X.T() = 0.5434 -0.7168 -1.4913 1.4805 0.1374 -1.2208
array H | ( | ) | const [inherited] |
Conjugate transpose (i.e.
1+2i
becomes 1-2i
). Real arrays are simply transposed.
X = 0.2925 - 0.7184i 2.5470 - 0.0034i 0.1290 + 0.3728i 0.1000 - 0.3932i 0.0083 - 0.2510i 1.0822 - 0.6650i X.H() = 0.2925 + 0.7184i 0.1000 + 0.3932i 2.5470 + 0.0034i 0.0083 + 0.2510i 0.1290 - 0.3728i 1.0822 + 0.6650i
array af::lower | ( | const array & | input, |
int | diagonal = 0 |
||
) |
Extract lower triangular matrix.
[in] | input | matrix |
[in] | diagonal | to include in extraction: diagonal==0 is the center diagonal (default), diagonal>0 is above, and diagonal<0 is below. |
array af::upper | ( | const array & | input, |
int | diagonal = 0 |
||
) |
Extract upper triangular matrix.
[in] | input | matrix |
[in] | diagonal | to include in extraction: diagonal==0 is the center diagonal (default), diagonal>0 is above, and diagonal<0 is below. |
array af::diagonal | ( | const array & | input, |
int | diag = 0 |
||
) |
Extract or form diagonal matrix.
[in] | input | if vector then produce diagonal matrix, if matrix then extract diagonal vector |
[in] | diag | which diagonal to extract or form: diag==0 is the center diagonal (default), diag>0 is above, and diag<0 is below. |
array af::join | ( | const array & | A, |
const array & | B, | ||
int | dim = 0 |
||
) |
Join two arrays along dimension dim
.
[in] | A | |
[in] | B | |
[in] | dim | along which to join |
join(a,b,0) = 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 join(a,b,1) = 1.0000 1.0000 1.0000 0.0000 0.0000 0.0000 1.0000 1.0000 1.0000 0.0000 0.0000 0.0000
array af::newdims | ( | const array & | input, |
const dim4 & | newdims | ||
) |
Adjust the dimensions of an N-D array (fast).
[in] | input | |
[in] | newdims | total number of elements must not change. |
array af::newdims | ( | const array & | input, |
int | dim0, | ||
int | dim1 = 1 , |
||
int | dim2 = 1 , |
||
int | dim3 = 1 |
||
) |
Adjust the dimensions of an N-D array (fast).
Total number of elements must not change.
[in] | input | |
[in] | dim0 | first dimension |
[in] | dim1 | second dimension |
[in] | dim2 | third dimension |
[in] | dim3 | fourth dimension |
array af::flipv | ( | const array & | in | ) |
Flip matrix vertically.
array af::fliph | ( | const array & | in | ) |
Flip matrix vertically.
array af::flipdim | ( | const array & | in, |
unsigned | dim | ||
) |
Flip array along a given dimension.
[in] | in | |
[in] | dim | dimension along which to flip |
array af::tile | ( | const array & | A, |
unsigned | d0, | ||
unsigned | d1 = 1 , |
||
unsigned | d2 = 1 |
||
) |
tile (repeat) array along specified dimensions
[in] | A | |
[in] | d0 | repetitions along first dimension (1 indicates no repeat) |
[in] | d1 | repetitions along second dimension (default: 1, no repeat) |
[in] | d2 | repetitions along third dimension (default: 1, no repeat) |
A
repeated according to specified repetitions array af::tile | ( | const array & | A, |
const dim4 & | dims | ||
) |
tile (repeat) array along specified dimensions
[in] | A | |
[in] | dims | specifications of number of times to repeat |
A
repeated acc A
repeated according to specified repetitions array af::flat | ( | const array & | A | ) |
Flatten an array into column vector.
No work is done (data is simply shared) so this is effectively a noop.
[in] | A |
array af::shift | ( | const array & | in, |
int | dim0 = 0 , |
||
int | dim1 = 0 , |
||
int | dim2 = 0 , |
||
int | dim3 = 0 |
||
) |
Shift the values of an array around dimension (wrap around).
[in] | in | |
[in] | dim0 | Shift along first dimension |
[in] | dim1 | Shift along second dimension |
[in] | dim2 | Shift along third dimension |
[in] | dim3 | Shift along fourth dimension |
array af::shift | ( | const array & | in, |
const array & | shift | ||
) |
Shift the values of an array around dimension (wrap around).
[in] | in | |
[in] | shift | integer array (s32 prefered) indicating shifts |
array af::reorder | ( | const array & | in, |
int | dim0 = -1 , |
||
int | dim1 = -1 , |
||
int | dim2 = -1 , |
||
int | dim3 = -1 |
||
) |
Reorder dimensions of array.
[in] | in | |
[in] | dim0 | first reordering dimension (-1 indicates leave in place, default) |
[in] | dim1 | second reordering dimension (-1 indicates leave in place, default) |
[in] | dim2 | third reordering dimension (-1 indicates leave in place, default) |
[in] | dim3 | fourth reordering dimension (-1 indicates leave in place, default) |