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
2bc6cf55
Commit
2bc6cf55
authored
Jul 12, 2012
by
Davis King
Browse files
Minor change to avoid compiler errors on some compilers.
parent
8656a2d0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
18 deletions
+38
-18
dlib/statistics/statistics.h
dlib/statistics/statistics.h
+38
-18
No files found.
dlib/statistics/statistics.h
View file @
2bc6cf55
...
@@ -926,29 +926,17 @@ namespace dlib
...
@@ -926,29 +926,17 @@ namespace dlib
temp_out
.
swap
(
item
.
temp_out
);
temp_out
.
swap
(
item
.
temp_out
);
}
}
template
<
typename
T
>
friend
void
deserialize
(
friend
void
deserialize
(
vector_normalizer_pca
&
item
,
vector_normalizer_pca
<
T
>
&
item
,
std
::
istream
&
in
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
(
friend
void
serialize
(
const
vector_normalizer_pca
&
item
,
const
vector_normalizer_pca
<
T
>
&
item
,
std
::
ostream
&
out
std
::
ostream
&
out
)
);
{
serialize
(
item
.
m
,
out
);
serialize
(
item
.
sd
,
out
);
serialize
(
item
.
pca
,
out
);
}
private:
private:
...
@@ -1022,6 +1010,38 @@ namespace dlib
...
@@ -1022,6 +1010,38 @@ namespace dlib
vector_normalizer_pca
<
matrix_type
>&
b
vector_normalizer_pca
<
matrix_type
>&
b
)
{
a
.
swap
(
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