![]() |
MAOS
Multithreaded Adaptive Optics Simulator
|
Macros | |
#define | AOS_LIB_TYPE |
#define | AOS_LMAT(A) l##A |
Calls LX(new) with a filename to be saved to.
lmat * lmat_cast | ( | const_anyarray | A | ) |
check and cast an object to matrix
check the size of matrix if exist. Otherwise create it. content is not zeroed if already exists.
creat a reference to an existing matrix. header is duplicated if exists.
create an new reference another with different shape.
creat a new matrix referencing columns in existing matrix. reference counted.
Override a stack matrix struct with pointers to columns of another matrix. Does not add reference count the original data.
Resize a matrix by adding or removing columns or rows. Data is kept whenever possible.
Create a new sub matrix of nx*ny starting from(sx,sy) and copy the data.
Concatenate two matrixes into 1 along "dim" (1 for x, 2 for y)
int lzerocol | ( | lmat * | A, |
int | icol | ||
) |
Set column elements to zero.
Permute the vector so that out(:)=in(p);
Reverse permute the vector so that out(p)=in(:);
int lflip | ( | lmat * | A, |
int | axis | ||
) |
Flip the matrix along the set axis. 0 to flip both, 1 along x, 2 along y.
Sort all columns of A, in ascending order if ascend is non zero, otherwise in descending order.
Find unique values and sort from small to large.
input | input array |
ascend | sorting direction |
reorder B and embed/crop into center of A .
4 * * 3 * * * * * * * * 2 * * 1
to
1 2 3 4
cyclic shift A by nx and ny to B.
4 3 1 2 2 1 to 3 4
create an new cell similar to A in shape. When a cell is empty, it is created with an emtry matrix and cannot be overriden.
Create an new cell with matrix specified. Each block is stored continuously in memory.
Create an new cell with matrix specified. Each block is stored continuously in memory.
lcell * lcellnew_file | ( | long | nx, |
long | ny, | ||
long * | nnx, | ||
long * | nny, | ||
const char * | keywords, | ||
const char * | format, | ||
... | |||
) |
Calls cellnew3 with a filename to be saved to.
lcell * lcellnewsame_file | ( | long | nx, |
long | ny, | ||
long | mx, | ||
long | my, | ||
const char * | keywords, | ||
const char * | format, | ||
... | |||
) |
Calls cellnew_same with a filename to be saved to.
creat a cell reference an existing cell by referencing the elements.
reduce nx*ny cell matrix to 1*ny if dim=1 and nx*1 if dim=2 by merging the cells.
convert a vector to cell using dimensions specified in dims. Reference the vector
make A a cell array using shape information from ref if *B is NULL.
Notice that empty cells may be replaced by zeros if it is within valid column or row.
input is nsa*ncol cell. each cell has npix=nx*ny elements. Extract icol of cell as npix*nsa array.
Routines for input/output to bin/fits file. Function to write dense matrix data into a file pointer. Generally used by library developer
Function to read dense matrix into memory from file pointer. Generally used by library developer.
Create a new LX(mat) matrix object, mmapped from file. The file is truncated if already exists in rw mode.
lcell * lcellnew_mmap | ( | long | nx, |
long | ny, | ||
long * | nnx, | ||
long * | nny, | ||
const char * | keywords, | ||
const char * | format, | ||
... | |||
) |
Create a new dense matrix cell object, mmapped from file. The file is truncated if already exists.
lcell * lcellnewsame_mmap | ( | long | nx, |
long | ny, | ||
long | mx, | ||
long | my, | ||
const char * | keywords, | ||
const char * | format, | ||
... | |||
) |
Create a new dense matrix cell object, with identical blocks, mmapped from file. be aware that the data is not 8-byte aligned. The file is truncated if already exists.