aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/ode-0.9/ode/src/mat.h
diff options
context:
space:
mode:
authordan miller2007-10-19 05:22:23 +0000
committerdan miller2007-10-19 05:22:23 +0000
commit1ec410ecd725f5a3ccb2d2fc16f48730d9d9fe43 (patch)
tree51bcae7a1b8381a6bf6fd8025a7de1e30fe0045d /libraries/ode-0.9/ode/src/mat.h
parentone more for the gipper (diff)
downloadopensim-SC-1ec410ecd725f5a3ccb2d2fc16f48730d9d9fe43.zip
opensim-SC-1ec410ecd725f5a3ccb2d2fc16f48730d9d9fe43.tar.gz
opensim-SC-1ec410ecd725f5a3ccb2d2fc16f48730d9d9fe43.tar.bz2
opensim-SC-1ec410ecd725f5a3ccb2d2fc16f48730d9d9fe43.tar.xz
trying to fix my screwup, please hold on
Diffstat (limited to 'libraries/ode-0.9/ode/src/mat.h')
-rw-r--r--libraries/ode-0.9/ode/src/mat.h71
1 files changed, 0 insertions, 71 deletions
diff --git a/libraries/ode-0.9/ode/src/mat.h b/libraries/ode-0.9/ode/src/mat.h
deleted file mode 100644
index 2814a01..0000000
--- a/libraries/ode-0.9/ode/src/mat.h
+++ /dev/null
@@ -1,71 +0,0 @@
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// matrix class. this is mostly for convenience in the testing code, it is
24// not optimized at all. correctness is much more importance here.
25
26#ifndef _ODE_MAT_H_
27#define _ODE_MAT_H_
28
29#include <ode/common.h>
30
31
32class dMatrix {
33 int n,m; // matrix dimension, n,m >= 0
34 dReal *data; // if nonzero, n*m elements allocated on the heap
35
36public:
37 // constructors, destructors
38 dMatrix(); // make default 0x0 matrix
39 dMatrix (int rows, int cols); // construct zero matrix of given size
40 dMatrix (const dMatrix &); // construct copy of given matrix
41 // create copy of given data - element (i,j) is data[i*rowskip+j*colskip]
42 dMatrix (int rows, int cols, dReal *_data, int rowskip, int colskip);
43 ~dMatrix(); // destructor
44
45 // data movement
46 dReal & operator () (int i, int j); // reference an element
47 void operator= (const dMatrix &); // matrix = matrix
48 void operator= (dReal); // matrix = scalar
49 dMatrix transpose(); // return transposed matrix
50 // return a permuted submatrix of this matrix, made up of the rows in p
51 // and the columns in q. p has np elements, q has nq elements.
52 dMatrix select (int np, int *p, int nq, int *q);
53
54 // operators
55 dMatrix operator + (const dMatrix &);
56 dMatrix operator - (const dMatrix &);
57 dMatrix operator - ();
58 dMatrix operator * (const dMatrix &);
59 void operator += (const dMatrix &);
60 void operator -= (const dMatrix &);
61
62 // utility
63 void clearUpperTriangle();
64 void clearLowerTriangle();
65 void makeRandom (dReal range);
66 void print (char *fmt = "%10.4f ", FILE *f=stdout);
67 dReal maxDifference (const dMatrix &);
68};
69
70
71#endif