Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
lib4neuro
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
MolDyn
lib4neuro
Commits
95056685
Commit
95056685
authored
6 years ago
by
Martin Beseda
Browse files
Options
Downloads
Patches
Plain Diff
FIX: Added serialization method to NeuronBiased class
parent
6dd83076
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/Neuron/NeuronBiased.cpp
+6
-0
6 additions, 0 deletions
src/Neuron/NeuronBiased.cpp
src/Neuron/NeuronBiasedSerialization.h
+38
-4
38 additions, 4 deletions
src/Neuron/NeuronBiasedSerialization.h
with
44 additions
and
4 deletions
src/Neuron/NeuronBiased.cpp
+
6
−
0
View file @
95056685
...
...
@@ -5,9 +5,15 @@
* @date 15.3.19 -
*/
#include
<boost/serialization/export.hpp>
#include
"NeuronBiased.h"
#include
"NeuronConstant.h"
#include
"NeuronBiasedSerialization.h"
BOOST_CLASS_EXPORT_IMPLEMENT
(
lib4neuro
::
NeuronBiased
);
namespace
lib4neuro
{
NeuronBiased
::
NeuronBiased
(
double
b
)
{
...
...
This diff is collapsed.
Click to expand it.
src/Neuron/NeuronBiasedSerialization.h
+
38
−
4
View file @
95056685
//
// Created by martin on 19.3.19.
//
#ifndef LIB4NEURO_NEURONBIASEDSERIALIZATION_H
#define LIB4NEURO_NEURONBIASEDSERIALIZATION_H
#include
<boost/serialization/base_object.hpp>
#include
<boost/archive/text_oarchive.hpp>
#include
<boost/archive/text_iarchive.hpp>
#include
<boost/serialization/export.hpp>
#include
"NeuronSerialization.h"
#include
"NeuronBiased.h"
BOOST_CLASS_EXPORT_KEY
(
lib4neuro
::
NeuronBiased
);
struct
lib4neuro
::
NeuronBiased
::
access
{
template
<
class
Archive
>
static
void
serialize
(
Archive
&
ar
,
lib4neuro
::
NeuronBiased
&
n
,
const
unsigned
int
version
)
{
ar
&
boost
::
serialization
::
base_object
<
lib4neuro
::
Neuron
>
(
n
);
ar
&
n
.
bias
;
}
};
namespace
boost
{
namespace
serialization
{
/**
* Serialization function
* @tparam Archive Boost library template
* @param ar Boost parameter - filled automatically during serialization!
* @param n NeuronBiased instance
* @param version Boost parameter - filled automatically during serialization!
*/
template
<
class
Archive
>
void
serialize
(
Archive
&
ar
,
lib4neuro
::
NeuronBiased
&
n
,
const
unsigned
int
version
)
{
lib4neuro
::
NeuronBiased
::
access
::
serialize
(
ar
,
n
,
version
);
}
}
// namespace serialization
}
// namespace boost
#endif //LIB4NEURO_NEURONBIASEDSERIALIZATION_H
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