GenSVM
Classes | Functions
gensvm_task.h File Reference

Header file for gensvm_task.c. More...

#include "gensvm_base.h"
Include dependency graph for gensvm_task.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  GenTask
 A structure for a single task in the queue. More...
 

Functions

struct GenTaskgensvm_init_task (void)
 Initialize a GenTask structure. More...
 
struct GenTaskgensvm_copy_task (struct GenTask *t)
 Deepcopy a GenTask struct. More...
 
void gensvm_free_task (struct GenTask *t)
 Free the GenTask struct. More...
 
void gensvm_task_to_model (struct GenTask *task, struct GenModel *model)
 Copy parameters from GenTask to GenModel. More...
 

Detailed Description

Header file for gensvm_task.c.

Author
G.J.J. van den Burg
Date
2013-08-01

The grid search for the optimal parameters is done through a queue. This file contains struct definitions for the tasks in the queue. Initialization and free functions are also included.

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_task.h.

Function Documentation

◆ gensvm_copy_task()

struct GenTask* gensvm_copy_task ( struct GenTask t)

Deepcopy a GenTask struct.

Create a deep copy of a GenTask struct. Note that the datasets belonging to the tasks are not copied, only the pointers to the datasets.

Parameters
[in]tinput GenTask struct to copy
Returns
a deepcopy of the input GenTask

Definition at line 88 of file gensvm_task.c.

Here is the call graph for this function:

◆ gensvm_free_task()

void gensvm_free_task ( struct GenTask t)

Free the GenTask struct.

Freeing the allocated memory of the GenTask means freeing only the task itself. The datasets are not freed, as these are shared between all tasks.

Parameters
[in]tGenTask to be freed

Definition at line 71 of file gensvm_task.c.

◆ gensvm_init_task()

struct GenTask* gensvm_init_task ( void  )

Initialize a GenTask structure.

A GenTask structure is initialized and the default value for the parameters are set. A pointer to the initialized GenTask is returned.

Returns
initialized GenTask

Definition at line 38 of file gensvm_task.c.

◆ gensvm_task_to_model()

void gensvm_task_to_model ( struct GenTask task,
struct GenModel model 
)

Copy parameters from GenTask to GenModel.

A GenTask struct only contains the parameters of the GenModel to be estimated. This function is used to copy these parameters.

Parameters
[in]taskGenTask instance with parameters
[in,out]modelGenModel to which the parameters are copied

Definition at line 122 of file gensvm_task.c.