ESyS-Particle
2.2
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
Matrix3.h
Go to the documentation of this file.
1
2
// //
3
// Copyright (c) 2003-2013 by The University of Queensland //
4
// Earth Systems Science Computational Centre (ESSCC) //
5
// http://www.uq.edu.au/esscc //
6
// //
7
// Primary Business: Brisbane, Queensland, Australia //
8
// Licensed under the Open Software License version 3.0 //
9
// http://www.opensource.org/licenses/osl-3.0.php //
10
// //
12
13
#ifndef __MATRIX3_H
14
#define __MATRIX3_H
15
16
#define DO_INLINE_MATRIX3 1
17
18
#if DO_INLINE_MATRIX3 >= 1
19
#define MATRIX3_INLINE inline
20
#else
21
#define MATRIX3_INLINE
22
#endif
23
24
// --- IO includes ---
25
#include <iostream>
26
using
std::ostream;
27
29
class
MatSingularError
30
{
31
public
:
32
MATRIX3_INLINE
MatSingularError
()
33
{
34
};
35
};
36
37
38
class
Vec3
;
47
class
Matrix3
48
{
49
private
:
50
double
m
[3][3];
51
52
public
:
53
MATRIX3_INLINE
Matrix3
();
54
MATRIX3_INLINE
Matrix3
(
const
Vec3
&,
const
Vec3
&,
const
Vec3
&);
55
MATRIX3_INLINE
Matrix3
(
const
double
[3][3]);
56
MATRIX3_INLINE
Matrix3
(
const
Matrix3
&);
57
MATRIX3_INLINE
virtual
~Matrix3
();
58
59
MATRIX3_INLINE
double
det
();
60
Vec3
solve
(
const
Vec3
&)
const
;
61
Vec3
solve_homogeneous
()
const
;
62
void
invert
();
63
MATRIX3_INLINE
Matrix3
inv
();
64
MATRIX3_INLINE
void
transpose
();
65
MATRIX3_INLINE
Matrix3
trans
()
const
;
66
MATRIX3_INLINE
Vec3
operator *
(
const
Vec3
&)
const
;
67
MATRIX3_INLINE
Matrix3
operator *
(
double
)
const
;
68
MATRIX3_INLINE
Matrix3
operator /
(
double
)
const
;
69
MATRIX3_INLINE
Matrix3
operator *
(
const
Matrix3
&)
const
;
70
MATRIX3_INLINE
Matrix3
&
operator +=
(
const
Matrix3
&);
71
MATRIX3_INLINE
Matrix3
operator +
(
const
Matrix3
&)
const
;
72
MATRIX3_INLINE
Matrix3
operator -
(
const
Matrix3
&)
const
;
73
MATRIX3_INLINE
bool
operator==
(
const
Matrix3
&)
const
;
74
MATRIX3_INLINE
Matrix3
&
operator=
(
const
Matrix3
&);
75
MATRIX3_INLINE
double
trace
()
const
;
76
MATRIX3_INLINE
double
norm
()
const
;
77
78
MATRIX3_INLINE
double
operator()
(
int
i,
int
j)
const
{
return
m
[i][j];}
79
80
MATRIX3_INLINE
double
&
operator()
(
int
i,
int
j){
return
m
[i][j];}
81
82
MATRIX3_INLINE
friend
Matrix3
operator*
(
double
,
const
Matrix3
&);
83
85
MATRIX3_INLINE
friend
Matrix3
star
(
const
Vec3
&);
86
88
MATRIX3_INLINE
static
Matrix3
Unit
();
89
91
void
eigen
(
Vec3
&,
Vec3
&,
Vec3
&,
double
&,
double
&,
double
&);
92
93
// output
94
MATRIX3_INLINE
friend
ostream&
operator<<
(ostream&,
const
Matrix3
&);
95
};
96
97
#if DO_INLINE_MATRIX3 >= 1
98
#include "
Foundation/Matrix3.hpp
"
99
#endif
100
101
#endif //__MATRIX3_H
Foundation
Matrix3.h
Generated on Mon May 6 2013 23:26:29 for ESyS-Particle by
1.8.3.1