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
bc36f05e
Commit
bc36f05e
authored
5 years ago
by
Joan Solà Ortega
Browse files
Options
Downloads
Patches
Plain Diff
Remove size() from the API
parent
050558b1
No related branches found
No related tags found
1 merge request
!377
Resolve "Fix Problem::getState() and getState(ts)"
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
include/core/state_block/state_composite.h
+0
-2
0 additions, 2 deletions
include/core/state_block/state_composite.h
src/state_block/state_composite.cpp
+0
-12
0 additions, 12 deletions
src/state_block/state_composite.cpp
test/gtest_state_composite.cpp
+0
-14
0 additions, 14 deletions
test/gtest_state_composite.cpp
with
0 additions
and
28 deletions
include/core/state_block/state_composite.h
+
0
−
2
View file @
bc36f05e
...
@@ -49,8 +49,6 @@ class VectorComposite : public std::unordered_map < std::string, Eigen::VectorXd
...
@@ -49,8 +49,6 @@ class VectorComposite : public std::unordered_map < std::string, Eigen::VectorXd
VectorComposite
(
const
VectorXd
&
_v
,
const
StateStructure
&
_structure
,
const
std
::
list
<
int
>&
_sizes
);
VectorComposite
(
const
VectorXd
&
_v
,
const
StateStructure
&
_structure
,
const
std
::
list
<
int
>&
_sizes
);
VectorComposite
(
const
StateStructure
&
_structure
,
const
std
::
list
<
VectorXd
>&
_vectors
);
VectorComposite
(
const
StateStructure
&
_structure
,
const
std
::
list
<
VectorXd
>&
_vectors
);
unsigned
int
size
(
const
StateStructure
&
_structure
)
const
;
Eigen
::
VectorXd
vector
(
const
StateStructure
&
_structure
)
const
;
Eigen
::
VectorXd
vector
(
const
StateStructure
&
_structure
)
const
;
/**
/**
...
...
This diff is collapsed.
Click to expand it.
src/state_block/state_composite.cpp
+
0
−
12
View file @
bc36f05e
...
@@ -62,18 +62,6 @@ VectorComposite::VectorComposite (const StateStructure& _structure, const std::l
...
@@ -62,18 +62,6 @@ VectorComposite::VectorComposite (const StateStructure& _structure, const std::l
}
}
unsigned
int
VectorComposite
::
size
(
const
StateStructure
&
_structure
)
const
{
unsigned
int
size
=
0
;
for
(
const
auto
&
ckey
:
_structure
)
{
std
::
string
key
(
1
,
ckey
);
// ckey is char
const
VectorXd
&
v
=
this
->
at
(
key
);
size
+=
v
.
size
();
}
return
size
;
}
Eigen
::
VectorXd
VectorComposite
::
vector
(
const
StateStructure
&
_structure
)
const
Eigen
::
VectorXd
VectorComposite
::
vector
(
const
StateStructure
&
_structure
)
const
{
{
// traverse once with unordered_map access
// traverse once with unordered_map access
...
...
This diff is collapsed.
Click to expand it.
test/gtest_state_composite.cpp
+
0
−
14
View file @
bc36f05e
...
@@ -331,20 +331,6 @@ TEST(VectorComposite, unary_Minus)
...
@@ -331,20 +331,6 @@ TEST(VectorComposite, unary_Minus)
ASSERT_MATRIX_APPROX
((
-
x
).
at
(
"O"
),
Vector3d
(
-
2
,
-
2
,
-
2
),
1e-20
);
ASSERT_MATRIX_APPROX
((
-
x
).
at
(
"O"
),
Vector3d
(
-
2
,
-
2
,
-
2
),
1e-20
);
}
}
TEST
(
VectorComposite
,
size
)
{
VectorComposite
x
;
x
.
emplace
(
"P"
,
Vector2d
(
1
,
1
));
x
.
emplace
(
"O"
,
Vector3d
(
2
,
2
,
2
));
x
.
emplace
(
"V"
,
Vector4d
(
3
,
3
,
3
,
3
));
ASSERT_EQ
(
x
.
size
(
"PO"
),
5
);
ASSERT_EQ
(
x
.
size
(
"VO"
),
7
);
ASSERT_EQ
(
x
.
size
(
"PVO"
),
9
);
ASSERT_EQ
(
x
.
size
(
"OPV"
),
9
);
}
TEST
(
VectorComposite
,
stateVector
)
TEST
(
VectorComposite
,
stateVector
)
{
{
VectorComposite
x
;
VectorComposite
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