Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
miscmaths
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FSL
miscmaths
Commits
ad4801b5
Commit
ad4801b5
authored
7 years ago
by
Jesper Andersson
Browse files
Options
Downloads
Patches
Plain Diff
Changed, and massively speeded up, implementation of TransMult and TransMultSelf methods
parent
636e6182
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
SpMat.h
+6
-4
6 additions, 4 deletions
SpMat.h
with
6 additions
and
4 deletions
SpMat.h
+
6
−
4
View file @
ad4801b5
...
...
@@ -135,13 +135,13 @@ public:
const
NEWMAT
::
ReturnMatrix
TransMult
(
const
NEWMAT
::
ColumnVector
&
x
)
const
{
return
(
trans_mult
(
x
));
// Duplication for compatibility with IML++
}
const
SpMat
<
T
>
TransMult
(
const
SpMat
<
T
>&
B
)
const
;
// Multiplication of transpose(*this) with sparse matrix B
const
SpMat
<
T
>
TransMult
(
const
SpMat
<
T
>&
B
)
const
{
return
(
this
->
t
()
*
B
);
}
// Multiplication of transpose(*this) with sparse matrix B
SpMat
<
T
>&
operator
*=
(
double
s
);
// Multiplication of self with scalar
SpMat
<
T
>
operator
-
(
const
SpMat
<
T
>&
M
)
const
{
return
(
SpMat
<
T
>
(
M
)
*=
-
1.0
);}
// Unary minus
SpMat
<
T
>&
operator
|=
(
const
SpMat
<
T
>&
rh
);
// Hor concat to right
SpMat
<
T
>&
operator
&=
(
const
SpMat
<
T
>&
bh
);
// Vert concat below
const
SpMat
<
T
>
TransMultSelf
()
const
{
return
(
TransMult
(
*
this
)
)
;}
// Returns transpose(*this)*(*this)
const
SpMat
<
T
>
TransMultSelf
()
const
{
return
(
this
->
t
()
*
*
this
);}
// Returns transpose(*this)*(*this)
const
SpMat
<
T
>
t
()
const
;
// Returns transpose(*this).
...
...
@@ -745,9 +745,11 @@ const NEWMAT::ReturnMatrix SpMat<T>::operator*(const NEWMAT::ColumnVector& x) co
/////////////////////////////////////////////////////////////////////
//
// Multiply transpose with sparse matrix B returning matrix C (C = A'*B)
// This implementation was found to be inferior to C = A.t()*B, so
// it has been replaced by that for now and the code below commented out.
//
/////////////////////////////////////////////////////////////////////
/*
template<class T>
const SpMat<T> SpMat<T>::TransMult(const SpMat<T>& B) const
{
...
...
@@ -785,7 +787,7 @@ const SpMat<T> SpMat<T>::TransMult(const SpMat<T>& B) const
return(C);
}
*/
/////////////////////////////////////////////////////////////////////
//
// Multiply transpose with vector x returning vector b (b = A'*x)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment