Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Aland, Sebastian
amdis
Commits
de6bb9ba
Commit
de6bb9ba
authored
Apr 01, 2014
by
Backofen, Rainer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added operator: WorlMatrix*scalar->WorldMatrix and WorldMatrix*WorldVector->WorldVector
parent
365bc7e9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
0 deletions
+29
-0
AMDiS/src/FixVec.h
AMDiS/src/FixVec.h
+29
-0
No files found.
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
Markdown
is supported
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