Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
Term Paper
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
Philip Mueller
Term Paper
Commits
f91149dc
Commit
f91149dc
authored
5 years ago
by
Philip Mueller, HS
Browse files
Options
Downloads
Patches
Plain Diff
Added the new constructors to the sample array interface of pyYggdrasil.
parent
bbd01ac2
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
code/cpp/pyyggdrasil/pyYggdrasil_sampleContainers.cpp
+16
-0
16 additions, 0 deletions
code/cpp/pyyggdrasil/pyYggdrasil_sampleContainers.cpp
with
16 additions
and
0 deletions
code/cpp/pyyggdrasil/pyYggdrasil_sampleContainers.cpp
+
16
−
0
View file @
f91149dc
...
...
@@ -217,6 +217,16 @@ pyYggdrasil_sampleContainersWrapper(
"This constructor constructs a sample array by deep copying the sourc array src."
,
py
::
arg
(
"src"
)
)
.
def
(
py
::
init
([](
const
SampleList_t
&
sl
)
->
SampleArray_t
{
return
SampleArray_t
(
sl
);}),
"This constructor performs a deep copy of the sample list src."
,
py
::
arg
(
"src"
)
)
.
def
(
py
::
init
([](
const
SampleCollection_t
sc
)
->
SampleArray_t
{
return
SampleArray_t
(
sc
);}),
"This constructor performs a deep copy of the sample collection src."
,
py
::
arg
(
"src"
)
)
.
def
(
py
::
init
([](
const
MatrixRef_t
&
mat
,
eMatrixViewRow
view
)
->
SampleArray_t
{
//This will also check for infinity; according to the Eigen manual
...
...
@@ -233,6 +243,12 @@ pyYggdrasil_sampleContainersWrapper(
py
::
arg
(
"mat"
),
py
::
arg
(
"view"
)
)
.
def
(
"clone"
,
[](
const
SampleArray_t
&
sa
)
->
SampleArray_t
{
return
sa
.
clone
();},
"This function performs a deep copy of *this."
" This function allows to copy a container without the need of knowing its type."
" This is interesting when exploiting duck typing."
)
/*
* Operators
...
...
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