Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Backofen, Rainer
amdis
Commits
de6bb9ba
Commit
de6bb9ba
authored
Apr 01, 2014
by
Backofen, Rainer
Browse files
added operator: WorlMatrix*scalar->WorldMatrix and WorldMatrix*WorldVector->WorldVector
parent
365bc7e9
Changes
1
Hide whitespace changes
Inline
Side-by-side
AMDiS/src/FixVec.h
View file @
de6bb9ba
...
...
@@ -585,6 +585,35 @@ namespace AMDiS {
template
<
typename
T
>
const
WorldMatrix
<
T
>&
operator
+=
(
WorldMatrix
<
T
>&
m1
,
const
WorldMatrix
<
T
>&
m2
);
template
<
typename
T
>
WorldMatrix
<
T
>
operator
*
(
const
WorldMatrix
<
T
>&
v
,
double
d
)
{
WorldMatrix
<
T
>
result
=
v
;
result
*=
d
;
return
result
;
}
template
<
typename
T
>
WorldMatrix
<
T
>
operator
*
(
double
d
,
const
WorldMatrix
<
T
>&
v
)
{
return
v
*
d
;
}
template
<
typename
T
>
WorldMatrix
<
T
>
operator
/
(
const
WorldMatrix
<
T
>&
v
,
double
d
)
{
WorldMatrix
<
T
>
result
=
v
;
result
=
1.
/
d
*
v
;
return
result
;
}
template
<
typename
T
>
WorldVector
<
T
>
operator
*
(
const
WorldMatrix
<
T
>&
M
,
const
WorldVector
<
T
>&
v
)
{
WorldVector
<
T
>
res
;
res
.
multMatrixVec
(
M
,
v
);
return
res
;
}
inline
double
norm
(
const
WorldVector
<
double
>&
v
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment