Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
2bc6cf55
Commit
2bc6cf55
authored
Jul 13, 2012
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor change to avoid compiler errors on some compilers.
parent
8656a2d0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
18 deletions
+38
-18
statistics.h
dlib/statistics/statistics.h
+38
-18
No files found.
dlib/statistics/statistics.h
View file @
2bc6cf55
...
...
@@ -926,29 +926,17 @@ namespace dlib
temp_out
.
swap
(
item
.
temp_out
);
}
template
<
typename
T
>
friend
void
deserialize
(
vector_normalizer_pca
&
item
,
vector_normalizer_pca
<
T
>
&
item
,
std
::
istream
&
in
)
{
deserialize
(
item
.
m
,
in
);
deserialize
(
item
.
sd
,
in
);
deserialize
(
item
.
pca
,
in
);
if
(
item
.
pca
.
nc
()
!=
item
.
m
.
nr
())
throw
serialization_error
(
"Error deserializing object of type vector_normalizer_pca
\n
"
"It looks like a serialized vector_normalizer was accidentally deserialized into
\n
"
"a vector_normalizer_pca object."
);
}
);
template
<
typename
T
>
friend
void
serialize
(
const
vector_normalizer_pca
&
item
,
const
vector_normalizer_pca
<
T
>
&
item
,
std
::
ostream
&
out
)
{
serialize
(
item
.
m
,
out
);
serialize
(
item
.
sd
,
out
);
serialize
(
item
.
pca
,
out
);
}
);
private
:
...
...
@@ -1022,6 +1010,38 @@ namespace dlib
vector_normalizer_pca
<
matrix_type
>&
b
)
{
a
.
swap
(
b
);
}
// ----------------------------------------------------------------------------------------
template
<
typename
matrix_type
>
void
deserialize
(
vector_normalizer_pca
<
matrix_type
>&
item
,
std
::
istream
&
in
)
{
deserialize
(
item
.
m
,
in
);
deserialize
(
item
.
sd
,
in
);
deserialize
(
item
.
pca
,
in
);
if
(
item
.
pca
.
nc
()
!=
item
.
m
.
nr
())
throw
serialization_error
(
"Error deserializing object of type vector_normalizer_pca
\n
"
"It looks like a serialized vector_normalizer was accidentally deserialized into
\n
"
"a vector_normalizer_pca object."
);
}
template
<
typename
matrix_type
>
void
serialize
(
const
vector_normalizer_pca
<
matrix_type
>&
item
,
std
::
ostream
&
out
)
{
serialize
(
item
.
m
,
out
);
serialize
(
item
.
sd
,
out
);
serialize
(
item
.
pca
,
out
);
}
// ----------------------------------------------------------------------------------------
}
...
...
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