SuperSCS  1.3.2
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
scs_parser.h
Go to the documentation of this file.
1 /*
2  * The MIT License (MIT)
3  *
4  * Copyright (c) 2017 Pantelis Sopasakis (https://alphaville.github.io),
5  * Krina Menounou (https://www.linkedin.com/in/krinamenounou),
6  * Panagiotis Patrinos (http://homes.esat.kuleuven.be/~ppatrino)
7  * Copyright (c) 2012 Brendan O'Donoghue (bodonoghue85@gmail.com)
8  *
9  * Permission is hereby granted, free of charge, to any person obtaining a copy
10  * of this software and associated documentation files (the "Software"), to deal
11  * in the Software without restriction, including without limitation the rights
12  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13  * copies of the Software, and to permit persons to whom the Software is
14  * furnished to do so, subject to the following conditions:
15  *
16  * The above copyright notice and this permission notice shall be included in all
17  * copies or substantial portions of the Software.
18  *
19  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25  * SOFTWARE.
26  *
27  */
28 #ifndef SCS_PARSER_H_GUARD
29 #define SCS_PARSER_H_GUARD
30 
31 #if !(defined _WIN32 || defined _WIN64 || defined _WINDLL || defined __APPLE__)
32 #ifdef _POSIX_C_SOURCE
33 #undef _POSIX_C_SOURCE
34 #endif
35 #define _POSIX_C_SOURCE 199309L
36 #endif
37 
38 #include "glbopts.h"
39 #include <string.h>
40 #include "cones.h"
41 #include "linAlg.h"
42 #include "linSys.h"
43 #include "util.h"
44 #include "ctrlc.h"
45 #include "constants.h"
46 #include <math.h>
47 #include <stdio.h>
48 #include <time.h>
49 #include "scs.h"
50 #include "linsys/amatrix.h"
51 
52 #ifdef __cplusplus
53 extern "C" {
54 #endif
55 
59 #define SCS_METADATA_TEXT_SIZE 1024
60 
99  };
100 
102 
122 
123 
154  scs_int scs_from_YAML(const char * filepath,
155  ScsData ** data,
156  ScsCone ** cone);
157 
177  const char * RESTRICT filepath,
178  ScsConicProblemMetadata * metadata,
179  const ScsData * RESTRICT data,
180  const ScsCone * RESTRICT cone);
181 
182 
183 
184 #ifdef __cplusplus
185 }
186 #endif
187 #endif
#define SCS_METADATA_TEXT_SIZE
Definition: scs_parser.h:59
char yamlVersion[SCS_METADATA_TEXT_SIZE]
YAML version.
Definition: scs_parser.h:94
#define RESTRICT
Definition: glbopts.h:44
ScsConicProblemMetadata * scs_init_conic_problem_metadata(const char *problemName)
Initializes a ScsConicProblemMetadata structure.
char license[SCS_METADATA_TEXT_SIZE]
License of the problem data.
Definition: scs_parser.h:86
char problemName[SCS_METADATA_TEXT_SIZE]
Problem name.
Definition: scs_parser.h:80
char date[SCS_METADATA_TEXT_SIZE]
Creation date.
Definition: scs_parser.h:98
int scs_int
Definition: glbopts.h:96
Cone structure.
Definition: cones.h:48
char creator[SCS_METADATA_TEXT_SIZE]
Creator of the problem.
Definition: scs_parser.h:90
scs_int scs_from_YAML(const char *filepath, ScsData **data, ScsCone **cone)
struct containing problem data
Definition: scs.h:254
Metadata for conic optimization problems.
Definition: scs_parser.h:70
scs_int scs_to_YAML(const char *RESTRICT filepath, ScsConicProblemMetadata *metadata, const ScsData *RESTRICT data, const ScsCone *RESTRICT cone)