pmm
1.0.0
Main Page
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
src
pmm_octave.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2008-2010 Robert Higgins
3
Author: Robert Higgins <robert.higgins@ucd.ie>
4
5
This file is part of PMM.
6
7
PMM is free software: you can redistribute it and/or modify
8
it under the terms of the GNU General Public License as published by
9
the Free Software Foundation, either version 3 of the License, or
10
(at your option) any later version.
11
12
PMM is distributed in the hope that it will be useful,
13
but WITHOUT ANY WARRANTY; without even the implied warranty of
14
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
GNU General Public License for more details.
16
17
You should have received a copy of the GNU General Public License
18
along with PMM. If not, see <http://www.gnu.org/licenses/>.
19
*/
20
/*!
21
* @file pmm_octave.h
22
* @brief data structure for interaction with octave
23
*/
24
#ifndef PMM_OCTAVE_H_
25
#define PMM_OCTAVE_H_
26
27
#if HAVE_CONFIG_H
28
#include "
config.h
"
29
30
/* undefine variables that are also defined in oct.h */
31
#undef PACKAGE
32
#undef PACKAGE_URL
33
#undef VERSION
34
#undef PACKAGE_BUGREPORT
35
#undef PACKAGE_NAME
36
#undef PACKAGE_STRING
37
#undef PACKAGE_TARNAME
38
#undef PACKAGE_VERSION
39
#endif
40
41
42
#ifdef __cplusplus
43
extern
"C"
{
44
#endif
45
46
#ifndef __cplusplus
47
typedef
struct
Matrix
{}
Matrix
;
48
typedef
struct
ColumnVector
{}
ColumnVector
;
49
#else
50
#include <octave/oct.h>
51
/* undefine variables that are also defined in oct.h */
52
#undef PACKAGE
53
#undef PACKAGE_URL
54
#undef VERSION
55
#undef PACKAGE_BUGREPORT
56
#undef PACKAGE_NAME
57
#undef PACKAGE_STRING
58
#undef PACKAGE_TARNAME
59
#undef PACKAGE_VERSION
60
#endif
61
62
/*!
63
* Structure containing octave objects which are used in interpolation of
64
* models
65
*/
66
typedef
struct
pmm_octave_data
{
67
Matrix
x
;
/*!< matrix containing the parameter values */
68
ColumnVector
y
;
/*!< vector containing the value of model at @a x */
69
Matrix
tri
;
/*!< matix containing the triangulation of the point
70
cloud described by @a x and @a y */
71
}
PMM_Octave_Data
;
72
73
#define PMM_ALL 0
/*!< use all points */
74
#define PMM_AVG 1
/*!< use average of points with identical parameters */
75
#define PMM_MAX 2
/*!< use maximum of points with identical parameters */
76
77
void
octave_init
();
78
struct
pmm_octave_data
*
79
fill_octave_input_matrices
(
struct
pmm_model
*m,
int
mode);
80
int
81
octave_triangulate
(
struct
pmm_octave_data
*oct_data);
82
double
83
octave_interp
(
struct
pmm_octave_data
*oct_data,
int
*p,
int
n);
84
double
*
85
octave_interp_array
(
struct
pmm_octave_data
*oct_data,
int
**p,
int
n,
int
l);
86
87
double
88
octave_interpolate
(
struct
pmm_octave_data
*oct_data,
int
*p,
int
n);
89
90
struct
pmm_benchmark
*
91
interpolate_griddatan
(
struct
pmm_model
*m,
int
*
p
);
92
93
94
95
96
#ifdef __cplusplus
97
}
98
#endif
99
100
#endif
/*PMM_OCTAVE_H_*/
Generated on Fri Apr 5 2013 18:25:33 for pmm by
1.8.1.2