aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/ode-0.9/ode/src/testing.h
diff options
context:
space:
mode:
authordan miller2007-10-19 05:24:38 +0000
committerdan miller2007-10-19 05:24:38 +0000
commitf205de7847da7ae1c10212d82e7042d0100b4ce0 (patch)
tree9acc9608a6880502aaeda43af52c33e278e95b9c /libraries/ode-0.9/ode/src/testing.h
parenttrying to fix my screwup part deux (diff)
downloadopensim-SC-f205de7847da7ae1c10212d82e7042d0100b4ce0.zip
opensim-SC-f205de7847da7ae1c10212d82e7042d0100b4ce0.tar.gz
opensim-SC-f205de7847da7ae1c10212d82e7042d0100b4ce0.tar.bz2
opensim-SC-f205de7847da7ae1c10212d82e7042d0100b4ce0.tar.xz
from the start... checking in ode-0.9
Diffstat (limited to 'libraries/ode-0.9/ode/src/testing.h')
-rw-r--r--libraries/ode-0.9/ode/src/testing.h65
1 files changed, 65 insertions, 0 deletions
diff --git a/libraries/ode-0.9/ode/src/testing.h b/libraries/ode-0.9/ode/src/testing.h
new file mode 100644
index 0000000..4d19ff3
--- /dev/null
+++ b/libraries/ode-0.9/ode/src/testing.h
@@ -0,0 +1,65 @@
1/*************************************************************************
2 * *
3 * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. *
4 * All rights reserved. Email: russ@q12.org Web: www.q12.org *
5 * *
6 * This library is free software; you can redistribute it and/or *
7 * modify it under the terms of EITHER: *
8 * (1) The GNU Lesser General Public License as published by the Free *
9 * Software Foundation; either version 2.1 of the License, or (at *
10 * your option) any later version. The text of the GNU Lesser *
11 * General Public License is included with this library in the *
12 * file LICENSE.TXT. *
13 * (2) The BSD-style license that is included with this library in *
14 * the file LICENSE-BSD.TXT. *
15 * *
16 * This library is distributed in the hope that it will be useful, *
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files *
19 * LICENSE.TXT and LICENSE-BSD.TXT for more details. *
20 * *
21 *************************************************************************/
22
23/* stuff used for testing */
24
25#ifndef _ODE_TESTING_H_
26#define _ODE_TESTING_H_
27
28#include <ode/common.h>
29#include "array.h"
30
31
32// compare a sequence of named matrices/vectors, i.e. to make sure that two
33// different pieces of code are giving the same results.
34
35class dMatrixComparison {
36 struct dMatInfo;
37 dArray<dMatInfo*> mat;
38 int afterfirst,index;
39
40public:
41 dMatrixComparison();
42 ~dMatrixComparison();
43
44 dReal nextMatrix (dReal *A, int n, int m, int lower_tri, char *name, ...);
45 // add a new n*m matrix A to the sequence. the name of the matrix is given
46 // by the printf-style arguments (name,...). if this is the first sequence
47 // then this object will simply record the matrices and return 0.
48 // if this the second or subsequent sequence then this object will compare
49 // the matrices with the first sequence, and report any differences.
50 // the matrix error will be returned. if `lower_tri' is 1 then only the
51 // lower triangle of the matrix (including the diagonal) will be compared
52 // (the matrix must be square).
53
54 void end();
55 // end a sequence.
56
57 void reset();
58 // restarts the object, so the next sequence will be the first sequence.
59
60 void dump();
61 // print out info about all the matrices in the sequence
62};
63
64
65#endif