Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
CLHEP
CLHEP
Commits
bc040cc7
Commit
bc040cc7
authored
Jul 15, 2008
by
Lynn Garren
Browse files
work on MxS logic
parent
812a76cb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Matrix/src/SymMatrix.cc
View file @
bc040cc7
// -*- C++ -*-
// $Id: SymMatrix.cc,v 1.3.2.1
7
2008/07/15 1
5:24:09
garren Exp $
// $Id: SymMatrix.cc,v 1.3.2.1
8
2008/07/15 1
7:39:28
garren Exp $
// ---------------------------------------------------------------------------
//
// This file is a part of the CLHEP - a Class Library for High Energy Physics.
...
...
@@ -397,9 +397,12 @@ HepMatrix operator*(const HepMatrix &m1,const HepSymMatrix &m2)
HepMatrix
::
mcIter
mit1
,
mit2
,
sp
,
snp
;
//mit2=0
double
temp
;
HepMatrix
::
mIter
mir
=
mret
.
m
.
begin
();
int
step
,
stept
;
for
(
mit1
=
m1
.
m
.
begin
();
mit1
<
m1
.
m
.
begin
()
+
m1
.
num_row
()
*
m1
.
num_col
();
mit1
=
mit2
)
for
(
step
=
1
,
snp
=
m2
.
m
.
begin
();
step
<=
m2
.
num_row
();)
for
(
mit1
=
m1
.
m
.
begin
();
mit1
<
m1
.
m
.
begin
()
+
m1
.
num_row
()
*
m1
.
num_col
();
mit1
=
mit2
)
{
snp
=
m2
.
m
.
begin
();
for
(
int
step
=
1
;
step
<=
m2
.
num_row
();
++
step
)
{
mit2
=
mit1
;
sp
=
snp
;
...
...
@@ -407,14 +410,17 @@ HepMatrix operator*(const HepMatrix &m1,const HepSymMatrix &m2)
temp
=
0
;
while
(
sp
<
snp
)
temp
+=*
(
sp
++
)
*
(
*
(
mit2
++
));
sp
+=
step
-
1
;
for
(
stept
=++
step
;
stept
<=
m2
.
num_row
();
stept
++
)
{
temp
+=*
sp
*
(
*
(
mit2
++
));
sp
+=
stept
;
}
if
(
step
<
m2
.
num_row
()
)
{
// only if we aren't on the last row
sp
+=
step
-
1
;
for
(
int
stept
=
step
+
1
;
stept
<=
m2
.
num_row
();
stept
++
)
{
temp
+=*
sp
*
(
*
(
mit2
++
));
if
(
stept
<
m2
.
num_row
())
sp
+=
stept
;
}
}
// if(step
*
(
mir
++
)
=
temp
;
}
}
// for(step
}
// for(mit1
return
mret
;
}
...
...
@@ -446,8 +452,10 @@ HepMatrix operator*(const HepSymMatrix &m1,const HepMatrix &m2)
for
(
stept
=
step
+
1
;
stept
<=
m1
.
num_row
();
stept
++
)
{
temp
+=*
mit2
*
(
*
sp
);
mit2
+=
m2
.
num_col
();
sp
+=
stept
;
if
(
stept
<
m1
.
num_row
())
{
mit2
+=
m2
.
num_col
();
sp
+=
stept
;
}
}
*
(
mir
++
)
=
temp
;
}
...
...
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