Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
wolf
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
mobile_robotics
wolf_projects
wolf_lib
wolf
Commits
3949107a
Commit
3949107a
authored
5 years ago
by
Joaquim Casals Buñuel
Browse files
Options
Downloads
Patches
Plain Diff
Refactor CheckLog @ Problem::check
parent
ac2d3652
No related branches found
No related tags found
1 merge request
!346
Resolve "Frame/Capture/Feature/Landmark Other as list/vectors in FactorBase"
Pipeline
#5057
passed
5 years ago
Changes
2
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/core/utils/check_log.hpp
+35
-24
35 additions, 24 deletions
include/core/utils/check_log.hpp
src/problem/problem.cpp
+72
-118
72 additions, 118 deletions
src/problem/problem.cpp
with
107 additions
and
142 deletions
include/core/utils/check_log.hpp
+
35
−
24
View file @
3949107a
...
@@ -2,31 +2,42 @@
...
@@ -2,31 +2,42 @@
#define CHECK_LOG_HPP
#define CHECK_LOG_HPP
#include
<iostream>
#include
<iostream>
#include
<string>
#include
<string>
#include
<sstream>
class
CheckLog
{
namespace
wolf
{
class
CheckLog
{
public:
bool
is_consistent_
;
std
::
string
explanation_
;
public:
CheckLog
()
{
bool
is_consistent_
;
is_consistent_
=
true
;
std
::
string
explanation_
;
explanation_
=
""
;
}
CheckLog
()
{
CheckLog
(
bool
consistent
,
std
::
string
explanation
)
is_consistent_
=
true
;
{
explanation_
=
""
;
is_consistent_
=
consistent
;
}
if
(
not
consistent
)
CheckLog
(
bool
consistent
,
std
::
string
explanation
)
{
explanation_
=
explanation
;
is_consistent_
=
consistent
;
else
if
(
not
consistent
)
explanation_
=
""
;
explanation_
=
explanation
;
}
else
~
CheckLog
(){};
explanation_
=
""
;
void
compose
(
CheckLog
l
)
}
{
~
CheckLog
(){};
is_consistent_
=
is_consistent_
and
l
.
is_consistent_
;
void
compose
(
CheckLog
l
)
{
explanation_
=
explanation_
+
l
.
explanation_
;
}
CheckLog
result_log
;
void
addAssertion
(
bool
condition
,
std
::
stringstream
&
stream
)
is_consistent_
=
is_consistent_
and
l
.
is_consistent_
;
{
explanation_
=
explanation_
+
l
.
explanation_
;
auto
cl
=
CheckLog
(
condition
,
stream
.
str
());
}
this
->
compose
(
cl
);
// Clear inconsistency_explanation
std
::
stringstream
().
swap
(
stream
);
}
};
};
}
// namespace wolf
#endif
#endif
This diff is collapsed.
Click to expand it.
src/problem/problem.cpp
+
72
−
118
View file @
3949107a
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