annotate OrthancStone/Sources/Toolbox/LinearAlgebra.h @ 1592:0d4b11ba86df

fix
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 23 Oct 2020 15:15:32 +0200
parents 244ad1e4e76a
children 4fb8fdf03314
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
158
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 /**
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 * Stone of Orthanc
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4 * Department, University Hospital of Liege, Belgium
1270
2d8ab34c8c91 upgrade to year 2020
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1002
diff changeset
5 * Copyright (C) 2017-2020 Osimis S.A., Belgium
158
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 *
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 * This program is free software: you can redistribute it and/or
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 * modify it under the terms of the GNU Affero General Public License
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 * as published by the Free Software Foundation, either version 3 of
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 * the License, or (at your option) any later version.
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 *
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 * This program is distributed in the hope that it will be useful, but
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 * Affero General Public License for more details.
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 *
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 * You should have received a copy of the GNU Affero General Public License
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 **/
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 #pragma once
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 // Patch for ublas in Boost 1.64.0
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 // https://github.com/dealii/dealii/issues/4302
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 #include <boost/version.hpp>
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 #if BOOST_VERSION >= 106300 // or 64, need to check
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 # include <boost/serialization/array_wrapper.hpp>
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29 #endif
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30
1455
30deba7bc8e2 simplifying include_directories
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1270
diff changeset
31 #include <DicomFormat/DicomMap.h>
158
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 #include <boost/numeric/ublas/matrix.hpp>
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 #include <boost/numeric/ublas/vector.hpp>
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 namespace OrthancStone
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37 {
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38 typedef boost::numeric::ublas::matrix<double> Matrix;
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39 typedef boost::numeric::ublas::vector<double> Vector;
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40
949
32eaf4929b08 OrthancMultiframeVolumeLoader and OrthancSeriesVolumeProgressiveLoader now implement IGeometryProvider so that the geometry reference can be switched (CT or DOSE, for instance) + VolumeImageGeometry::SetSize renamed to VolumeImageGeometry::SetSizeInVoxels + prevent text layer update if text or properties do not change + a few stream operator<< for debug (Vector, Matrix,...) + fixed memory access aligment issues in ImageBuffer3D::ExtractSagittalSlice + fix for wrong screen Y offset of mpr slices in DicomVolumeImageMPRSlicer.
Benjamin Golinvaux <bgo@osimis.io>
parents: 647
diff changeset
41 // logs, debugging...
32eaf4929b08 OrthancMultiframeVolumeLoader and OrthancSeriesVolumeProgressiveLoader now implement IGeometryProvider so that the geometry reference can be switched (CT or DOSE, for instance) + VolumeImageGeometry::SetSize renamed to VolumeImageGeometry::SetSizeInVoxels + prevent text layer update if text or properties do not change + a few stream operator<< for debug (Vector, Matrix,...) + fixed memory access aligment issues in ImageBuffer3D::ExtractSagittalSlice + fix for wrong screen Y offset of mpr slices in DicomVolumeImageMPRSlicer.
Benjamin Golinvaux <bgo@osimis.io>
parents: 647
diff changeset
42 std::ostream& operator<<(std::ostream& s, const Vector& vec);
32eaf4929b08 OrthancMultiframeVolumeLoader and OrthancSeriesVolumeProgressiveLoader now implement IGeometryProvider so that the geometry reference can be switched (CT or DOSE, for instance) + VolumeImageGeometry::SetSize renamed to VolumeImageGeometry::SetSizeInVoxels + prevent text layer update if text or properties do not change + a few stream operator<< for debug (Vector, Matrix,...) + fixed memory access aligment issues in ImageBuffer3D::ExtractSagittalSlice + fix for wrong screen Y offset of mpr slices in DicomVolumeImageMPRSlicer.
Benjamin Golinvaux <bgo@osimis.io>
parents: 647
diff changeset
43 std::ostream& operator<<(std::ostream& s, const Matrix& m);
32eaf4929b08 OrthancMultiframeVolumeLoader and OrthancSeriesVolumeProgressiveLoader now implement IGeometryProvider so that the geometry reference can be switched (CT or DOSE, for instance) + VolumeImageGeometry::SetSize renamed to VolumeImageGeometry::SetSizeInVoxels + prevent text layer update if text or properties do not change + a few stream operator<< for debug (Vector, Matrix,...) + fixed memory access aligment issues in ImageBuffer3D::ExtractSagittalSlice + fix for wrong screen Y offset of mpr slices in DicomVolumeImageMPRSlicer.
Benjamin Golinvaux <bgo@osimis.io>
parents: 647
diff changeset
44
158
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45 namespace LinearAlgebra
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46 {
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47 void Print(const Vector& v);
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49 void Print(const Matrix& m);
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
51 bool ParseVector(Vector& target,
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52 const std::string& s);
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
54 bool ParseVector(Vector& target,
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
55 const Orthanc::DicomMap& dataset,
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56 const Orthanc::DicomTag& tag);
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
57
181
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
58 inline void AssignVector(Vector& v,
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
59 double v1,
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
60 double v2)
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
61 {
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
62 v.resize(2);
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
63 v[0] = v1;
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
64 v[1] = v2;
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
65 }
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
66
165
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
67
181
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
68 inline void AssignVector(Vector& v,
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
69 double v1)
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
70 {
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
71 v.resize(1);
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
72 v[0] = v1;
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
73 }
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
74
158
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
75
181
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
76 inline void AssignVector(Vector& v,
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
77 double v1,
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
78 double v2,
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
79 double v3)
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
80 {
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
81 v.resize(3);
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
82 v[0] = v1;
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
83 v[1] = v2;
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
84 v[2] = v3;
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
85 }
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
86
158
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
87
181
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
88 inline void AssignVector(Vector& v,
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
89 double v1,
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
90 double v2,
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
91 double v3,
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
92 double v4)
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
93 {
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
94 v.resize(4);
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
95 v[0] = v1;
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
96 v[1] = v2;
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
97 v[2] = v3;
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
98 v[3] = v4;
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
99 }
161
197a5ddaf68c FiniteProjectiveCamera
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 159
diff changeset
100
181
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
101
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
102 inline Vector CreateVector(double v1)
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
103 {
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
104 Vector v;
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
105 AssignVector(v, v1);
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
106 return v;
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
107 }
165
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
108
181
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
109
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
110 inline Vector CreateVector(double v1,
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
111 double v2)
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
112 {
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
113 Vector v;
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
114 AssignVector(v, v1, v2);
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
115 return v;
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
116 }
165
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
117
181
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
118
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
119 inline Vector CreateVector(double v1,
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
120 double v2,
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
121 double v3)
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
122 {
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
123 Vector v;
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
124 AssignVector(v, v1, v2, v3);
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
125 return v;
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
126 }
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
127
165
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
128
181
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
129 inline Vector CreateVector(double v1,
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
130 double v2,
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
131 double v3,
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
132 double v4)
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
133 {
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
134 Vector v;
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
135 AssignVector(v, v1, v2, v3, v4);
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
136 return v;
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
137 }
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
138
165
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
139
158
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
140 inline bool IsNear(double x,
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
141 double y,
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
142 double threshold)
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
143 {
647
6af3099ed8da uncoupling OrthancStone::SlicesSorter from OrthancStone::Slice
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 439
diff changeset
144 return fabs(x - y) <= threshold;
158
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
145 }
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
146
181
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
147 inline bool IsNear(double x,
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
148 double y)
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
149 {
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
150 // As most input is read as single-precision numbers, we take the
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
151 // epsilon machine for float32 into consideration to compare numbers
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
152 return IsNear(x, y, 10.0 * std::numeric_limits<float>::epsilon());
ff8556874557 speedup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 169
diff changeset
153 }
158
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
154
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
155 inline bool IsCloseToZero(double x)
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
156 {
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
157 return IsNear(x, 0.0);
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
158 }
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
159
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
160 void NormalizeVector(Vector& u);
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
161
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
162 void CrossProduct(Vector& result,
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
163 const Vector& u,
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
164 const Vector& v);
1002
341e68752354 dot product
Benjamin Golinvaux <bgo@osimis.io>
parents: 949
diff changeset
165
341e68752354 dot product
Benjamin Golinvaux <bgo@osimis.io>
parents: 949
diff changeset
166 double DotProduct(const Vector& u, const Vector& v);
341e68752354 dot product
Benjamin Golinvaux <bgo@osimis.io>
parents: 949
diff changeset
167
158
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
168 void FillMatrix(Matrix& target,
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
169 size_t rows,
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
170 size_t columns,
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
171 const double values[]);
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
172
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
173 void FillVector(Vector& target,
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
174 size_t size,
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
175 const double values[]);
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
176
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
177 void Convert(Matrix& target,
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
178 const Vector& source);
159
0a73d76333db populating LinearAlgebra
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 158
diff changeset
179
165
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
180 inline Matrix Transpose(const Matrix& a)
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
181 {
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
182 return boost::numeric::ublas::trans(a);
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
183 }
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
184
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
185
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
186 inline Matrix IdentityMatrix(size_t size)
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
187 {
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
188 return boost::numeric::ublas::identity_matrix<double>(size);
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
189 }
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
190
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
191
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
192 inline Matrix ZeroMatrix(size_t size1,
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
193 size_t size2)
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
194 {
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
195 return boost::numeric::ublas::zero_matrix<double>(size1, size2);
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
196 }
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
197
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
198
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
199 inline Matrix Product(const Matrix& a,
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
200 const Matrix& b)
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
201 {
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
202 return boost::numeric::ublas::prod(a, b);
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
203 }
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
204
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
205
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
206 inline Vector Product(const Matrix& a,
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
207 const Vector& b)
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
208 {
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
209 return boost::numeric::ublas::prod(a, b);
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
210 }
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
211
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
212
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
213 inline Matrix Product(const Matrix& a,
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
214 const Matrix& b,
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
215 const Matrix& c)
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
216 {
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
217 return Product(a, Product(b, c));
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
218 }
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
219
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
220
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
221 inline Matrix Product(const Matrix& a,
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
222 const Matrix& b,
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
223 const Matrix& c,
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
224 const Matrix& d)
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
225 {
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
226 return Product(a, Product(b, c, d));
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
227 }
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
228
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
229
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
230 inline Matrix Product(const Matrix& a,
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
231 const Matrix& b,
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
232 const Matrix& c,
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
233 const Matrix& d,
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
234 const Matrix& e)
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
235 {
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
236 return Product(a, Product(b, c, d, e));
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
237 }
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
238
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
239
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
240 inline Vector Product(const Matrix& a,
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
241 const Matrix& b,
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
242 const Vector& c)
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
243 {
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
244 return Product(Product(a, b), c);
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
245 }
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
246
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
247
166
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 165
diff changeset
248 inline Vector Product(const Matrix& a,
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 165
diff changeset
249 const Matrix& b,
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 165
diff changeset
250 const Matrix& c,
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 165
diff changeset
251 const Vector& d)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 165
diff changeset
252 {
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 165
diff changeset
253 return Product(Product(a, b, c), d);
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 165
diff changeset
254 }
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 165
diff changeset
255
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 165
diff changeset
256
159
0a73d76333db populating LinearAlgebra
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 158
diff changeset
257 double ComputeDeterminant(const Matrix& a);
0a73d76333db populating LinearAlgebra
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 158
diff changeset
258
0a73d76333db populating LinearAlgebra
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 158
diff changeset
259 bool IsOrthogonalMatrix(const Matrix& q,
0a73d76333db populating LinearAlgebra
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 158
diff changeset
260 double threshold);
0a73d76333db populating LinearAlgebra
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 158
diff changeset
261
0a73d76333db populating LinearAlgebra
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 158
diff changeset
262 bool IsOrthogonalMatrix(const Matrix& q);
0a73d76333db populating LinearAlgebra
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 158
diff changeset
263
0a73d76333db populating LinearAlgebra
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 158
diff changeset
264 bool IsRotationMatrix(const Matrix& r,
0a73d76333db populating LinearAlgebra
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 158
diff changeset
265 double threshold);
0a73d76333db populating LinearAlgebra
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 158
diff changeset
266
0a73d76333db populating LinearAlgebra
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 158
diff changeset
267 bool IsRotationMatrix(const Matrix& r);
0a73d76333db populating LinearAlgebra
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 158
diff changeset
268
0a73d76333db populating LinearAlgebra
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 158
diff changeset
269 void InvertUpperTriangularMatrix(Matrix& output,
0a73d76333db populating LinearAlgebra
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 158
diff changeset
270 const Matrix& k);
0a73d76333db populating LinearAlgebra
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 158
diff changeset
271
0a73d76333db populating LinearAlgebra
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 158
diff changeset
272 /**
0a73d76333db populating LinearAlgebra
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 158
diff changeset
273 * This function computes the RQ decomposition of a 3x3 matrix,
0a73d76333db populating LinearAlgebra
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 158
diff changeset
274 * using Givens rotations. Reference: Algorithm A4.1 (page 579) of
0a73d76333db populating LinearAlgebra
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 158
diff changeset
275 * "Multiple View Geometry in Computer Vision" (2nd edition). The
0a73d76333db populating LinearAlgebra
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 158
diff changeset
276 * output matrix "Q" is a rotation matrix, and "R" is upper
0a73d76333db populating LinearAlgebra
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 158
diff changeset
277 * triangular.
0a73d76333db populating LinearAlgebra
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 158
diff changeset
278 **/
0a73d76333db populating LinearAlgebra
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 158
diff changeset
279 void RQDecomposition3x3(Matrix& r,
0a73d76333db populating LinearAlgebra
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 158
diff changeset
280 Matrix& q,
0a73d76333db populating LinearAlgebra
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 158
diff changeset
281 const Matrix& a);
163
8c5b24892ed2 LinearAlgebra::InvertMatrix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 161
diff changeset
282
8c5b24892ed2 LinearAlgebra::InvertMatrix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 161
diff changeset
283 void InvertMatrix(Matrix& target,
8c5b24892ed2 LinearAlgebra::InvertMatrix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 161
diff changeset
284 const Matrix& source);
165
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
285
169
7105e51e4907 InvertMatrixUnsafe
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
286 // This is the same as "InvertMatrix()", but without exception
7105e51e4907 InvertMatrixUnsafe
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
287 bool InvertMatrixUnsafe(Matrix& target,
7105e51e4907 InvertMatrixUnsafe
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
288 const Matrix& source);
7105e51e4907 InvertMatrixUnsafe
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
289
165
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
290 void CreateSkewSymmetric(Matrix& s,
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
291 const Vector& v);
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
292
166
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 165
diff changeset
293 Matrix InvertScalingTranslationMatrix(const Matrix& t);
165
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
294
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
295 bool IsShearMatrix(const Matrix& shear);
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
296
8d50e6be565d LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
297 Matrix InvertShearMatrix(const Matrix& shear);
158
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
298 };
a053ca7fa5c6 LinearAlgebra toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
299 }