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
ae848b3a
Commit
ae848b3a
authored
4 years ago
by
Joan Vallvé Navarro
Browse files
Options
Downloads
Patches
Plain Diff
method for checking structure
parent
aeabe238
No related branches found
No related tags found
1 merge request
!414
Resolve "IsMotion used in Problem::getState()"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/core/state_block/state_composite.h
+1
-7
1 addition, 7 deletions
include/core/state_block/state_composite.h
src/state_block/state_composite.cpp
+8
-0
8 additions, 0 deletions
src/state_block/state_composite.cpp
with
9 additions
and
7 deletions
include/core/state_block/state_composite.h
+
1
−
7
View file @
ae848b3a
...
@@ -69,13 +69,7 @@ class VectorComposite : public std::unordered_map < char, Eigen::VectorXd >
...
@@ -69,13 +69,7 @@ class VectorComposite : public std::unordered_map < char, Eigen::VectorXd >
void
set
(
const
VectorXd
&
_v
,
const
StateStructure
&
_structure
,
const
std
::
list
<
int
>&
_sizes
);
void
set
(
const
VectorXd
&
_v
,
const
StateStructure
&
_structure
,
const
std
::
list
<
int
>&
_sizes
);
void
setZero
();
void
setZero
();
bool
includesStructure
(
const
StateStructure
&
_structure
)
bool
includesStructure
(
const
StateStructure
&
_structure
)
const
;
{
for
(
auto
key
:
_structure
)
if
(
count
(
key
)
==
0
)
return
false
;
return
true
;
}
friend
std
::
ostream
&
operator
<<
(
std
::
ostream
&
_os
,
const
wolf
::
VectorComposite
&
_x
);
friend
std
::
ostream
&
operator
<<
(
std
::
ostream
&
_os
,
const
wolf
::
VectorComposite
&
_x
);
friend
wolf
::
VectorComposite
operator
+
(
const
wolf
::
VectorComposite
&
_x
,
const
wolf
::
VectorComposite
&
_y
);
friend
wolf
::
VectorComposite
operator
+
(
const
wolf
::
VectorComposite
&
_x
,
const
wolf
::
VectorComposite
&
_y
);
...
...
This diff is collapsed.
Click to expand it.
src/state_block/state_composite.cpp
+
8
−
0
View file @
ae848b3a
...
@@ -81,6 +81,14 @@ Eigen::VectorXd VectorComposite::vector(const StateStructure &_structure) const
...
@@ -81,6 +81,14 @@ Eigen::VectorXd VectorComposite::vector(const StateStructure &_structure) const
return
x
;
return
x
;
}
}
bool
VectorComposite
::
includesStructure
(
const
StateStructure
&
_structure
)
const
{
for
(
auto
key
:
_structure
)
if
(
count
(
key
)
==
0
)
return
false
;
return
true
;
}
std
::
ostream
&
operator
<<
(
std
::
ostream
&
_os
,
const
wolf
::
VectorComposite
&
_x
)
std
::
ostream
&
operator
<<
(
std
::
ostream
&
_os
,
const
wolf
::
VectorComposite
&
_x
)
{
{
for
(
const
auto
&
pair_key_vec
:
_x
)
for
(
const
auto
&
pair_key_vec
:
_x
)
...
...
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