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
522d98ea
Commit
522d98ea
authored
5 years ago
by
Joan Solà Ortega
Browse files
Options
Downloads
Patches
Plain Diff
Replace map --> unordered_map
parent
38083867
No related branches found
No related tags found
1 merge request
!341
Resolve "HasStateBlocks::addStateBlock() needs to register SB's"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
include/core/state_block/has_state_blocks.h
+7
-7
7 additions, 7 deletions
include/core/state_block/has_state_blocks.h
with
7 additions
and
7 deletions
include/core/state_block/has_state_blocks.h
+
7
−
7
View file @
522d98ea
...
@@ -26,7 +26,7 @@ class HasStateBlocks
...
@@ -26,7 +26,7 @@ class HasStateBlocks
void
appendToStructure
(
const
std
::
string
&
_frame_type
){
structure_
+=
_frame_type
;
}
void
appendToStructure
(
const
std
::
string
&
_frame_type
){
structure_
+=
_frame_type
;
}
bool
isInStructure
(
const
std
::
string
&
_sb_type
)
{
return
structure_
.
find
(
_sb_type
)
!=
std
::
string
::
npos
;
}
bool
isInStructure
(
const
std
::
string
&
_sb_type
)
{
return
structure_
.
find
(
_sb_type
)
!=
std
::
string
::
npos
;
}
const
std
::
map
<
std
::
string
,
StateBlockPtr
>&
getStateBlockMap
()
const
;
const
std
::
unordered_
map
<
std
::
string
,
StateBlockPtr
>&
getStateBlockMap
()
const
;
std
::
vector
<
StateBlockPtr
>
getStateBlockVec
()
const
;
std
::
vector
<
StateBlockPtr
>
getStateBlockVec
()
const
;
// Some typical shortcuts -- not all should be coded here, see notes below.
// Some typical shortcuts -- not all should be coded here, see notes below.
...
@@ -64,15 +64,15 @@ class HasStateBlocks
...
@@ -64,15 +64,15 @@ class HasStateBlocks
void
removeStateBlocks
(
ProblemPtr
_problem
);
void
removeStateBlocks
(
ProblemPtr
_problem
);
// States
// States
virtual
void
setState
(
const
Eigen
::
VectorXd
&
_state
,
const
bool
_notify
=
true
);
virtual
void
setState
(
const
Eigen
::
VectorXd
&
_state
,
const
bool
_notify
=
true
);
Eigen
::
VectorXd
getState
()
const
;
Eigen
::
VectorXd
getState
()
const
;
void
getState
(
Eigen
::
VectorXd
&
_state
)
const
;
void
getState
(
Eigen
::
VectorXd
&
_state
)
const
;
unsigned
int
getSize
()
const
;
unsigned
int
getSize
()
const
;
unsigned
int
getLocalSize
()
const
;
unsigned
int
getLocalSize
()
const
;
private
:
private
:
std
::
string
structure_
;
std
::
string
structure_
;
std
::
map
<
std
::
string
,
StateBlockPtr
>
state_block_map_
;
std
::
unordered_
map
<
std
::
string
,
StateBlockPtr
>
state_block_map_
;
};
};
...
@@ -97,7 +97,7 @@ inline HasStateBlocks::~HasStateBlocks()
...
@@ -97,7 +97,7 @@ inline HasStateBlocks::~HasStateBlocks()
//
//
}
}
inline
const
std
::
map
<
std
::
string
,
StateBlockPtr
>&
HasStateBlocks
::
getStateBlockMap
()
const
inline
const
std
::
unordered_
map
<
std
::
string
,
StateBlockPtr
>&
HasStateBlocks
::
getStateBlockMap
()
const
{
{
return
state_block_map_
;
return
state_block_map_
;
}
}
...
...
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