GenSVM
|
Global definitions. More...
#include "gensvm_memory.h"
#include <cblas.h>
#include <ctype.h>
#include <errno.h>
#include <limits.h>
#include <math.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
Go to the source code of this file.
Macros | |
#define | GENSVM_MAX_LINE_LENGTH 1024 |
#define | MIN_MAX_DEFINE |
#define | maximum(a, b) (a) > (b) ? (a) : (b) |
#define | minimum(a, b) (a) < (b) ? (a) : (b) |
#define | matrix_set(M, cols, i, j, val) M[(i)*(cols)+j] = val |
#define | matrix_get(M, cols, i, j) M[(i)*(cols)+j] |
#define | matrix_add(M, cols, i, j, val) M[(i)*(cols)+j] += val |
#define | matrix_mul(M, cols, i, j, val) M[(i)*(cols)+j] *= val |
#define | GENSVM_QUOTE(name) #name |
#define | GENSVM_STRING(macro) GENSVM_QUOTE(macro) |
#define | VERSION 0.0.0 |
#define | VERSION_STRING GENSVM_STRING(VERSION) |
Enumerations | |
enum | TrainType { CV =0, TT =1 } |
type of training used in parameter grid search More... | |
enum | KernelType { K_LINEAR =0, K_POLY =1, K_RBF =2, K_SIGMOID =3 } |
type of kernel used in training More... | |
Global definitions.
This header file contains defines and includes which are used in many parts of the program. Most notably, it includes the gensvm_memory.h header which defines functions for safe memory allocation.
Furthermore, a maximum and minimum function are defined here. These functions have their own include guards, to ensure potential linked libraries don't conflict with these definitions.
This file is part of GenSVM.
GenSVM is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
GenSVM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with GenSVM. If not, see http://www.gnu.org/licenses/.
Definition in file gensvm_globals.h.
#define GENSVM_MAX_LINE_LENGTH 1024 |
Maximum line length of files that are read into GenSVM.
Definition at line 80 of file gensvm_globals.h.
#define GENSVM_QUOTE | ( | name | ) | #name |
Definition at line 127 of file gensvm_globals.h.
#define GENSVM_STRING | ( | macro | ) | GENSVM_QUOTE(macro) |
Definition at line 128 of file gensvm_globals.h.
#define matrix_add | ( | M, | |
cols, | |||
i, | |||
j, | |||
val | |||
) | M[(i)*(cols)+j] += val |
Macro for adding to a matrix element (RowMajor order)
Definition at line 116 of file gensvm_globals.h.
#define matrix_get | ( | M, | |
cols, | |||
i, | |||
j | |||
) | M[(i)*(cols)+j] |
Macro for getting a matrix element (RowMajor order)
Definition at line 111 of file gensvm_globals.h.
#define matrix_mul | ( | M, | |
cols, | |||
i, | |||
j, | |||
val | |||
) | M[(i)*(cols)+j] *= val |
Macro for multiplying a matrix element (RowMajor order)
Definition at line 121 of file gensvm_globals.h.
#define matrix_set | ( | M, | |
cols, | |||
i, | |||
j, | |||
val | |||
) | M[(i)*(cols)+j] = val |
Macro for setting a matrix element (RowMajor order)
Definition at line 106 of file gensvm_globals.h.
#define maximum | ( | a, | |
b | |||
) | (a) > (b) ? (a) : (b) |
Macro for taking the maximum of two arguments.
Definition at line 94 of file gensvm_globals.h.
#define MIN_MAX_DEFINE |
Flag to check if minimum/maximum macro's are already defined. This can be useful when linking.
Definition at line 90 of file gensvm_globals.h.
#define minimum | ( | a, | |
b | |||
) | (a) < (b) ? (a) : (b) |
Macro for taking the minimum of two arguments.
Definition at line 98 of file gensvm_globals.h.
#define VERSION 0.0.0 |
Definition at line 131 of file gensvm_globals.h.
#define VERSION_STRING GENSVM_STRING(VERSION) |
Definition at line 134 of file gensvm_globals.h.
enum KernelType |
type of kernel used in training
Enumerator | |
---|---|
K_LINEAR | Linear kernel |
K_POLY | Polynomial kernel |
K_RBF | RBF kernel |
K_SIGMOID | Sigmoid kernel |
Definition at line 67 of file gensvm_globals.h.
enum TrainType |
type of training used in parameter grid search
Enumerator | |
---|---|
CV | cross validation |
TT | data with existing train/test split |
Definition at line 59 of file gensvm_globals.h.