GenSVM
All Classes Files Functions Variables Enumerations Enumerator Macros Pages
gensvm_update.h
Go to the documentation of this file.
1 
27 #ifndef GENSVM_UPDATE_H
28 #define GENSVM_UPDATE_H
29 
30 #include "gensvm_base.h"
31 #include "gensvm_print.h"
32 
33 // function declarations
34 double gensvm_calculate_omega(struct GenModel *model, struct GenData *data,
35  long i);
36 bool gensvm_majorize_is_simple(struct GenModel *model, struct GenData *data,
37  long i);
38 void gensvm_calculate_ab_non_simple(struct GenModel *model, long i, long j,
39  double *a, double *b_aq);
40 void gensvm_calculate_ab_simple(struct GenModel *model, long i, long j,
41  double *a, double *b_aq);
42 double gensvm_get_alpha_beta(struct GenModel *model, struct GenData *data,
43  long i, double *beta);
44 void gensvm_get_update(struct GenModel *model, struct GenData *data,
45  struct GenWork *work);
46 void gensvm_get_ZAZ_ZB_dense(struct GenModel *model, struct GenData *data,
47  struct GenWork *work);
48 void gensvm_get_ZAZ_ZB_sparse(struct GenModel *model, struct GenData *data,
49  struct GenWork *work);
50 void gensvm_get_ZAZ_ZB(struct GenModel *model, struct GenData *data,
51  struct GenWork *work);
52 int dposv(char UPLO, int N, int NRHS, double *A, int LDA, double *B,
53  int LDB);
54 int dsysv(char UPLO, int N, int NRHS, double *A, int LDA, int *IPIV,
55  double *B, int LDB, double *WORK, int LWORK);
56 
57 #endif
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.
Definition: gensvm_update.c:89
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.
Definition: gensvm_update.c:56
A structure to hold the GenSVM workspace.
Definition: gensvm_base.h:151
A structure to represent the data.
Definition: gensvm_base.h:57
A structure to represent a single GenSVM model.
Definition: gensvm_base.h:92
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.