Last change
on this file since 10198 was
10198,
checked in by ascheibe, 10 years ago
|
#1886
- added liblrs and c# wrapper for vertex enumeration/volume calculation
- use MIConvexHull for triangulation and volume calculation
- fixed vertex conversion code for MIConvexHull lib
- added a unit test for measuring performance of convex hull/volume calculation
|
File size:
1.5 KB
|
Line | |
---|
1 | /* HeuristicLab
|
---|
2 | * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
|
---|
3 | *
|
---|
4 | * This file is part of HeuristicLab.
|
---|
5 | *
|
---|
6 | * HeuristicLab is free software: you can redistribute it and/or modify
|
---|
7 | * it under the terms of the GNU General Public License as published by
|
---|
8 | * the Free Software Foundation, either version 3 of the License, or
|
---|
9 | * (at your option) any later version.
|
---|
10 | *
|
---|
11 | * HeuristicLab is distributed in the hope that it will be useful,
|
---|
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
14 | * GNU General Public License for more details.
|
---|
15 | *
|
---|
16 | * You should have received a copy of the GNU General Public License
|
---|
17 | * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
|
---|
18 | */
|
---|
19 | |
---|
20 | |
---|
21 | #include <stdio.h> |
---|
22 | #include <string.h> |
---|
23 | #include <extfunc.h> |
---|
24 | |
---|
25 | int main (int argc, char *argv[]) |
---|
26 | { |
---|
27 | const int numPoints = 4; |
---|
28 | const int dimension = 3; |
---|
29 | |
---|
30 | long num[dimension*numPoints]; |
---|
31 | long den[dimension*numPoints]; |
---|
32 | |
---|
33 | num[0] = 1; |
---|
34 | num[1] = 2; |
---|
35 | num[2] = 2; |
---|
36 | |
---|
37 | num[3] = 3; |
---|
38 | num[4] = 4; |
---|
39 | num[5] = 2; |
---|
40 | |
---|
41 | num[6] = 3; |
---|
42 | num[7] = 6; |
---|
43 | num[8] = 2; |
---|
44 | |
---|
45 | num[9] = 7; |
---|
46 | num[10] = 8; |
---|
47 | num[11] = 2; |
---|
48 | |
---|
49 | den[0] = 1; |
---|
50 | den[1] = 1; |
---|
51 | den[2] = 1; |
---|
52 | den[3] = 1; |
---|
53 | den[4] = 1; |
---|
54 | den[5] = 1; |
---|
55 | den[6] = 1; |
---|
56 | den[7] = 1; |
---|
57 | den[8] = 1; |
---|
58 | den[9] = 1; |
---|
59 | den[10] = 1; |
---|
60 | den[11] = 1; |
---|
61 | |
---|
62 | |
---|
63 | double volume = calculate_volume(numPoints, dimension, num, den); |
---|
64 | printf ("Volume is: %f", volume); |
---|
65 | return 0; |
---|
66 | } |
---|
67 | |
---|
68 | |
---|
Note: See
TracBrowser
for help on using the repository browser.