GenSVM
Functions
gensvm_task.c File Reference

Functions for initializing and freeing a GenTask. More...

#include "gensvm_task.h"
Include dependency graph for gensvm_task.c:

Go to the source code of this file.

Functions

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

Detailed Description

Functions for initializing and freeing a GenTask.

Author
G.J.J. van den Burg
Date
2016-05-01

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.c.

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.