usermat

usermat

Functions

Types and Values

#define MSEL_MAX
typedef matrix_subspec
struct matrix_subspec_

Description

Functions

mspec_get_row_index()

#define mspec_get_row_index(m) (m->sel[0].range[0])

mspec_get_col_index()

#define mspec_get_col_index(m) (m->sel[1].range[0])

mspec_set_row_index()

#define mspec_set_row_index(m,i) (m->sel[0].range[0] = m->sel[0].range[1] = (i))

mspec_set_col_index()

#define mspec_set_col_index(m,j) (m->sel[1].range[0] = m->sel[1].range[1] = (j))

gretl_is_matrix()

#define gretl_is_matrix(s) (get_matrix_by_name(s) != NULL)

matrix_subspec_new ()

matrix_subspec *
matrix_subspec_new (void);

get_named_matrix_list ()

GList *
get_named_matrix_list (void);

get_matrix_by_name ()

gretl_matrix *
get_matrix_by_name (const char *name);

Looks up a user-defined matrix by name.

Parameters

name

name of the matrix.

 

Returns

pointer to matrix, or NULL if not found.


get_matrix_copy_by_name ()

gretl_matrix *
get_matrix_copy_by_name (const char *name,
                         int *err);

Looks up a user-defined matrix by name.

Parameters

name

name of the matrix.

 

err

location to receive error code;

 

Returns

a copy of the named matrix, or NULL if not found.


steal_matrix_by_name ()

gretl_matrix *
steal_matrix_by_name (const char *name);

Looks up a user-defined matrix by name and if found, grabs the matrix, leaving the matrix pointer on the named matrix as NULL.

Parameters

name

name of the matrix.

 

Returns

pointer to matrix, or NULL if not found.


assign_scalar_to_submatrix ()

int
assign_scalar_to_submatrix (gretl_matrix *M,
                            double x,
                            matrix_subspec *spec);

matrix_replace_submatrix ()

int
matrix_replace_submatrix (gretl_matrix *M,
                          const gretl_matrix *S,
                          matrix_subspec *spec);

user_matrix_replace_submatrix ()

int
user_matrix_replace_submatrix (const char *mname,
                               const gretl_matrix *S,
                               matrix_subspec *spec);

umatrix_set_names_from_string ()

int
umatrix_set_names_from_string (gretl_matrix *M,
                               const char *s,
                               int byrow);

umatrix_set_names_from_array ()

int
umatrix_set_names_from_array (gretl_matrix *M,
                              void *data,
                              int byrow);

umatrix_set_names_from_list ()

int
umatrix_set_names_from_list (gretl_matrix *M,
                             const int *list,
                             const DATASET *dset,
                             int byrow);

user_matrix_get_column_name ()

char *
user_matrix_get_column_name (const gretl_matrix *M,
                             int col,
                             int *err);

user_matrix_get_determinant ()

double
user_matrix_get_determinant (gretl_matrix *m,
                             int tmpmat,
                             int f,
                             int *err);

user_matrix_matrix_func ()

gretl_matrix *
user_matrix_matrix_func (gretl_matrix *m,
                         int tmpmat,
                         int f,
                         int *err);

user_matrix_vec ()

gretl_matrix *
user_matrix_vec (const gretl_matrix *m,
                 int *err);

user_matrix_vech ()

gretl_matrix *
user_matrix_vech (const gretl_matrix *m,
                  int *err);

user_matrix_unvech ()

gretl_matrix *
user_matrix_unvech (const gretl_matrix *m,
                    int *err);

user_matrix_QR_decomp ()

gretl_matrix *
user_matrix_QR_decomp (const gretl_matrix *m,
                       const char *rname,
                       int *err);

user_matrix_SVD ()

gretl_matrix *
user_matrix_SVD (const gretl_matrix *m,
                 const char *uname,
                 const char *vname,
                 int *err);

user_matrix_ols ()

gretl_matrix *
user_matrix_ols (const gretl_matrix *Y,
                 const gretl_matrix *X,
                 const char *Uname,
                 const char *Vname,
                 gretlopt opt,
                 int *err);

user_matrix_rls ()

gretl_matrix *
user_matrix_rls (const gretl_matrix *Y,
                 const gretl_matrix *X,
                 const gretl_matrix *R,
                 const gretl_matrix *Q,
                 const char *Uname,
                 const char *Vname,
                 int *err);

user_matrix_GHK ()

gretl_matrix *
user_matrix_GHK (const gretl_matrix *C,
                 const gretl_matrix *A,
                 const gretl_matrix *B,
                 const gretl_matrix *U,
                 const char *dP_name,
                 int *err);

user_matrix_eigen_analysis ()

gretl_matrix *
user_matrix_eigen_analysis (const gretl_matrix *m,
                            const char *rname,
                            int symm,
                            int *err);

user_gensymm_eigenvals ()

gretl_matrix *
user_gensymm_eigenvals (const gretl_matrix *A,
                        const gretl_matrix *B,
                        const char *rname,
                        int *err);

matrix_get_element ()

double
matrix_get_element (const gretl_matrix *M,
                    int i,
                    int j,
                    int *err);

check_matrix_subspec ()

int
check_matrix_subspec (matrix_subspec *spec,
                      const gretl_matrix *m);

matrix_get_submatrix ()

gretl_matrix *
matrix_get_submatrix (const gretl_matrix *M,
                      matrix_subspec *spec,
                      int prechecked,
                      int *err);

user_matrix_get_submatrix ()

gretl_matrix *
user_matrix_get_submatrix (const char *name,
                           matrix_subspec *spec,
                           int *err);

matrix_invert_in_place ()

int
matrix_invert_in_place (gretl_matrix *m);

matrix_cholesky_in_place ()

int
matrix_cholesky_in_place (gretl_matrix *m);

matrix_transpose_in_place ()

int
matrix_transpose_in_place (gretl_matrix *m);

matrix_XTX_in_place ()

int
matrix_XTX_in_place (gretl_matrix *m);

Types and Values

MSEL_MAX

#define MSEL_MAX -999

matrix_subspec

typedef struct matrix_subspec_ matrix_subspec;

struct matrix_subspec_

struct matrix_subspec_ {
    int type[2];
    union msel sel[2];
    int *rslice;
    int *cslice;
};