MPSolve
3.2.2
Toggle main menu visibility
Loading...
Searching...
No Matches
convex.h
Go to the documentation of this file.
1
/*
2
* This file is part of MPSolve 3.2.2
3
*
4
* Copyright (C) 2001-2020, Dipartimento di Matematica "L. Tonelli", Pisa.
5
* License: http://www.gnu.org/licenses/gpl.html GPL version 3 or higher
6
*
7
* Authors:
8
* Leonardo Robol <leonardo.robol@unipi.it>
9
*/
10
16
17
#ifndef MPS_CONVEX_H_
18
#define MPS_CONVEX_H_
19
20
#include <
mps/mps.h
>
21
25
struct
mps_vertex
{
29
int
x
;
30
34
double
y
;
35
40
struct
mps_vertex
*
next
;
41
46
struct
mps_vertex
*
previous
;
47
};
48
49
typedef
struct
mps_vertex
mps_vertex
;
50
57
struct
mps_linear_hypograph
{
58
int
n;
59
60
mps_vertex
* last;
61
62
mps_vertex
* first;
63
};
64
65
typedef
struct
mps_linear_hypograph
mps_linear_hypograph
;
66
67
mps_linear_hypograph
* mps_convex_hull (
mps_context
* s,
mps_linear_hypograph
* l);
68
69
int
*
mps_fconvex
(
mps_context
* s,
int
n,
double
a[]);
70
71
mps_linear_hypograph
* mps_linear_hypograph_new (
mps_context
* ctx);
72
73
void
mps_linear_hypograph_free (
mps_context
* ctx,
mps_linear_hypograph
* l);
74
75
#endif
/* endif MPS_CONVEX_H_ */
76
77
mps_fconvex
int * mps_fconvex(mps_context *s, int n, double a[])
compute the convex hull of the data set a[].
Definition
convex.c:165
mps.h
Header file for libmps.
mps_context
this struct holds the state of the mps computation
Definition
context.h:60
mps_linear_hypograph
A set described as hypograph of a piecewise linear function.
Definition
convex.h:57
mps_vertex
Generic vertex of a linear hypograph.
Definition
convex.h:25
mps_vertex::next
struct mps_vertex * next
A pointer to the next vertex in the hypograph, or NULL if this is the last vertex or a detached one.
Definition
convex.h:40
mps_vertex::x
int x
The x coordinate of the vertex.
Definition
convex.h:29
mps_vertex::y
double y
The y coordinate of the vertex.
Definition
convex.h:34
mps_vertex::previous
struct mps_vertex * previous
A pointer to the previous vertex in the hypograph, or NULL if this is the first vertex or a detached ...
Definition
convex.h:46
include
mps
private
convex.h
Generated on
for MPSolve by
1.17.0