home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.disi.unige.it
/
2015-02-11.ftp.disi.unige.it.tar
/
ftp.disi.unige.it
/
pub
/
.person
/
BarlaA
/
sw
/
OLD
/
Simo
/
SVM
/
patt_rec.h
< prev
next >
Wrap
C/C++ Source or Header
|
2002-06-25
|
1KB
|
52 lines
#define MAXLENGTH 256
#define DELTA .000001 /* precision */
#define LINEAR_KERNEL 1
#define POLY_KERNEL 2
#define RBF_KERNEL 50
#define MV_KERNEL 10
#define NEGATIVE_KERNEL 3
#define HAUS_KERNEL_SIMM 200
#define UNKNOWN_KERNEL 255
#define length_training(tr) ((tr)->ell)
#define dim_training(tr) ((tr)->dim)
#define class_training(tr, i) ((tr)->points[i].class)
#define vect_training(tr, i) ((tr)->points[i].vect)
#ifndef byte
#define byte unsigned char
#endif
typedef struct {
double *vect; /* training vector */
int class; /* point class */
} Point;
typedef struct {
int ell; /* number of points */
int dim; /* point dimensionality */
Point *points; /* training points */
} training;
double kernel(int knl, double *v1, double *v2);
double ilmiomin(double x, double y);
double *solver();
void write_solution(FILE *fp, double *sol, int knl, double bee, double c_const);
void *myalloc(void *p, size_t size, char *message);
FILE *myfopen(char *fn, char *type, char *msg);
training *read_training(FILE *fp1, FILE *fp2);
double *solve(training *tr, int knl, double c_const, int spdim, char *f_kernel);
double **dmatrix();
int *ivector();
void free_ivector();
void free_dmatrix();
void nrerror();