Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
6fd1e18a
Commit
6fd1e18a
authored
Jan 24, 2018
by
Davis King
Browse files
Made orthogonalize() faster.
parent
344165cd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
4 deletions
+20
-4
dlib/matrix/matrix_la.h
dlib/matrix/matrix_la.h
+20
-4
No files found.
dlib/matrix/matrix_la.h
View file @
6fd1e18a
...
@@ -505,14 +505,30 @@ convergence:
...
@@ -505,14 +505,30 @@ convergence:
typename
T
,
typename
T
,
long
NR
,
long
NR
,
long
NC
,
long
NC
,
typename
MM
,
typename
MM
typename
L
>
void
orthogonalize
(
matrix
<
T
,
NR
,
NC
,
MM
,
row_major_layout
>&
m
)
{
// We don't really need to use this temporary, but doing it this way runs a lot
// faster.
matrix
<
T
,
NR
,
NC
,
MM
,
column_major_layout
>
temp
;
qr_decomposition
<
matrix
<
T
,
NR
,
NC
,
MM
,
row_major_layout
>>
(
m
).
get_q
(
temp
);
m
=
temp
;
}
template
<
typename
T
,
long
NR
,
long
NC
,
typename
MM
>
>
void
orthogonalize
(
void
orthogonalize
(
matrix
<
T
,
NR
,
NC
,
MM
,
L
>&
m
matrix
<
T
,
NR
,
NC
,
MM
,
column_major_layout
>&
m
)
)
{
{
qr_decomposition
<
matrix
<
T
,
NR
,
NC
,
MM
,
L
>
>
(
m
).
get_q
(
m
);
qr_decomposition
<
matrix
<
T
,
NR
,
NC
,
MM
,
column_major_layout
>
>
(
m
).
get_q
(
m
);
}
}
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
...
...
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