27 #ifndef GENSVM_UPDATE_H 28 #define GENSVM_UPDATE_H 39 double *a,
double *b_aq);
41 double *a,
double *b_aq);
43 long i,
double *beta);
52 int dposv(
char UPLO,
int N,
int NRHS,
double *A,
int LDA,
double *B,
54 int dsysv(
char UPLO,
int N,
int NRHS,
double *A,
int LDA,
int *IPIV,
55 double *B,
int LDB,
double *WORK,
int LWORK);
void gensvm_get_ZAZ_ZB_dense(struct GenModel *model, struct GenData *data, struct GenWork *work)
Calculate Z'*A*Z and Z'*B for dense matrices.
double gensvm_get_alpha_beta(struct GenModel *model, struct GenData *data, long i, double *beta)
Compute the alpha_i and beta_i for an instance.
void gensvm_get_update(struct GenModel *model, struct GenData *data, struct GenWork *work)
Perform a single step of the majorization algorithm to update V.
bool gensvm_majorize_is_simple(struct GenModel *model, struct GenData *data, long i)
Check if we can do simple majorization for a given instance.
void gensvm_calculate_ab_non_simple(struct GenModel *model, long i, long j, double *a, double *b_aq)
Compute majorization coefficients for non-simple instance.
void gensvm_calculate_ab_simple(struct GenModel *model, long i, long j, double *a, double *b_aq)
Compute majorization coefficients for simple instances.
double gensvm_calculate_omega(struct GenModel *model, struct GenData *data, long i)
Calculate the value of omega for a single instance.
A structure to hold the GenSVM workspace.
A structure to represent the data.
A structure to represent a single GenSVM model.
void gensvm_get_ZAZ_ZB(struct GenModel *model, struct GenData *data, struct GenWork *work)
Wrapper around calculation of Z'*A*Z and Z'*B for sparse and dense.
int dposv(char UPLO, int N, int NRHS, double *A, int LDA, double *B, int LDB)
Solve AX = B where A is symmetric positive definite.
Header file for gensvm_base.c.
void gensvm_get_ZAZ_ZB_sparse(struct GenModel *model, struct GenData *data, struct GenWork *work)
Calculate Z'*A*Z and Z'*B for sparse matrices.
int dsysv(char UPLO, int N, int NRHS, double *A, int LDA, int *IPIV, double *B, int LDB, double *WORK, int LWORK)
Solve a system of equations AX = B where A is symmetric.
Header file for gensvm_print.c.