GOBNILP  f164d83
pedigree_data.h
Go to the documentation of this file.
1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
2  * GOBNILP Copyright (C) 2012-2017 James Cussens, Mark Bartlett *
3  * *
4  * This program is free software; you can redistribute it and/or *
5  * modify it under the terms of the GNU General Public License as *
6  * published by the Free Software Foundation; either version 3 of the *
7  * License, or (at your option) any later version. *
8  * *
9  * This program is distributed in the hope that it will be useful, *
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
12  * General Public License for more details. *
13  * *
14  * You should have received a copy of the GNU General Public License *
15  * along with this program; if not, see *
16  * <http://www.gnu.org/licenses>. *
17  * *
18  * Additional permission under GNU GPL version 3 section 7 *
19  * *
20  * If you modify this Program, or any covered work, by linking or *
21  * combining it with SCIP (or a modified version of that library), *
22  * containing parts covered by the terms of the ZIB Academic License, *
23  * the licensors of this Program grant you additional permission to *
24  * convey the resulting work. *
25  * *
26  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
27 
32 #ifndef __PEDIGREE_DATA_H__
33 #define __PEDIGREE_DATA_H__
34 
35 #include <scip/scip.h>
36 
38 typedef struct
39 {
41  int n;
43  SCIP_VAR** SexVars;
45  int* ages;
47  char* sexes;
48 } PedigreeData;
49 
50 extern SCIP_RETCODE PE_deallocatePedigreeData(SCIP* scip, PedigreeData** pd);
51 extern SCIP_RETCODE PE_copyPedigreeData(SCIP* scip, PedigreeData* original, PedigreeData** duplicate);
52 
53 extern SCIP_RETCODE PE_writeToFile(SCIP* scip, FILE* file, PedigreeData* pd);
54 extern SCIP_RETCODE PE_parse(SCIP* scip, char* str, PedigreeData** pd);
55 
56 #endif
int * ages
The ages of each individual.
Definition: pedigree_data.h:45
char * sexes
The initially supplied sex of each individual.
Definition: pedigree_data.h:47
Problem data that relates solely to pedigree-based constraints.
Definition: pedigree_data.h:38
SCIP_RETCODE PE_deallocatePedigreeData(SCIP *scip, PedigreeData **pd)
Deallocates the memory associated with a PedigreeData structure.
Definition: pedigree_data.c:41
SCIP_VAR ** SexVars
Variable recording whether each individual is female.
Definition: pedigree_data.h:43
SCIP_RETCODE PE_parse(SCIP *scip, char *str, PedigreeData **pd)
Parses a PedigreeData structure from a sting.
Definition: pedigree_data.c:156
SCIP_RETCODE PE_writeToFile(SCIP *scip, FILE *file, PedigreeData *pd)
Writes a PedigreeData structure to file.
Definition: pedigree_data.c:100
int n
The number of individuals with pedigree data.
Definition: pedigree_data.h:41
SCIP_RETCODE PE_copyPedigreeData(SCIP *scip, PedigreeData *original, PedigreeData **duplicate)
Makes a deep copy of a PedigreeData structure.
Definition: pedigree_data.c:62