Last change
on this file since 10743 was
10207,
checked in by ascheibe, 11 years ago
|
#1886 added a unit test for volume calculation and the qhull library
|
File size:
1.7 KB
|
Line | |
---|
1 | #region License Information
|
---|
2 | /* HeuristicLab
|
---|
3 | * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
|
---|
4 | *
|
---|
5 | * This file is part of HeuristicLab.
|
---|
6 | *
|
---|
7 | * HeuristicLab 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 | * HeuristicLab 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 HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
|
---|
19 | */
|
---|
20 | #endregion
|
---|
21 |
|
---|
22 | using System;
|
---|
23 |
|
---|
24 | namespace Testliblrs {
|
---|
25 | class Program {
|
---|
26 | static void Main(string[] args) {
|
---|
27 | const int numPoints = 4;
|
---|
28 | const int dimension = 3;
|
---|
29 |
|
---|
30 | int[] num = new int[dimension * numPoints];
|
---|
31 | int[] den = new int[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] = 3;
|
---|
40 |
|
---|
41 | num[6] = 3;
|
---|
42 | num[7] = 6;
|
---|
43 | num[8] = 3;
|
---|
44 |
|
---|
45 | num[9] = 7;
|
---|
46 | num[10] = 8;
|
---|
47 | num[11] = 3;
|
---|
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 | double volume = LiblrsWrapper.calculate_volume(numPoints, dimension, num, den);
|
---|
63 | Console.WriteLine("Volume is: " + volume);
|
---|
64 | }
|
---|
65 | }
|
---|
66 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.