Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Simox
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Florian Leander Singer
Simox
Commits
ab5d4782
Commit
ab5d4782
authored
6 years ago
by
Raphael Grimm
Browse files
Options
Downloads
Patches
Plain Diff
Add SimpleAbstractFunctionRNRM and LineStripR1RM
parent
5de4ee9a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
VirtualRobot/math/LineStripR1RM.h
+8
-5
8 additions, 5 deletions
VirtualRobot/math/LineStripR1RM.h
VirtualRobot/math/SimpleAbstractFunctionRNRM.h
+2
-2
2 additions, 2 deletions
VirtualRobot/math/SimpleAbstractFunctionRNRM.h
with
10 additions
and
7 deletions
VirtualRobot/math/LineStripR1RM.h
+
8
−
5
View file @
ab5d4782
...
...
@@ -34,14 +34,17 @@ namespace math
public:
using
point_t
=
Eigen
::
Matrix
<
float
,
M
,
1
>
;
int
Count
()
{
return
points
.
size
();
}
int
Count
()
const
{
return
points
.
size
();
}
LineStripR1RM
(
std
::
vector
<
point_t
>
points
,
float
minT
,
float
maxT
)
:
points
(
std
::
move
(
points
)),
minT
(
minT
),
maxT
(
maxT
)
{}
bool
InLimits
(
float
t
);
point_t
Get
(
float
t
)
override
bool
InLimits
(
float
t
)
const
{
return
t
>=
minT
&&
t
<=
maxT
;
}
point_t
Get
(
float
t
)
const
override
{
int
i
;
float
f
;
GetIndex
(
t
,
i
,
f
);
...
...
@@ -49,11 +52,11 @@ namespace math
}
private
:
point_t
GetDirection
(
int
i
)
point_t
GetDirection
(
int
i
)
const
{
return
points
.
at
(
i
+
1
)
-
points
.
at
(
i
);
}
void
GetIndex
(
float
t
,
int
&
i
,
float
&
f
)
void
GetIndex
(
float
t
,
int
&
i
,
float
&
f
)
const
{
Helpers
::
GetIndex
(
t
,
minT
,
maxT
,
points
.
size
(),
i
,
f
);
}
...
...
This diff is collapsed.
Click to expand it.
VirtualRobot/math/SimpleAbstractFunctionRNRM.h
+
2
−
2
View file @
ab5d4782
...
...
@@ -32,7 +32,7 @@ namespace math
public:
using
in_t
=
Eigen
::
Matrix
<
float
,
N
,
1
>
;
using
out_t
=
Eigen
::
Matrix
<
float
,
M
,
1
>
;
virtual
out_t
Get
(
in_t
t
)
=
0
;
virtual
out_t
Get
(
in_t
t
)
const
=
0
;
private:
};
...
...
@@ -42,7 +42,7 @@ namespace math
public:
using
in_t
=
float
;
using
out_t
=
Eigen
::
Matrix
<
float
,
M
,
1
>
;
virtual
out_t
Get
(
in_t
t
)
=
0
;
virtual
out_t
Get
(
in_t
t
)
const
=
0
;
private:
};
...
...
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