Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
BornAgain
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mlz
BornAgain
Commits
b1702567
Commit
b1702567
authored
3 years ago
by
Matthias Puchner
Browse files
Options
Downloads
Patches
Plain Diff
rm obsolete code
parent
ea2398c1
No related branches found
No related tags found
1 merge request
!517
refactor sample builder
Pipeline
#51519
passed
3 years ago
Stage: build
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Param/Node/NodeUtils.cpp
+0
-32
0 additions, 32 deletions
Param/Node/NodeUtils.cpp
Param/Node/NodeUtils.h
+0
-4
0 additions, 4 deletions
Param/Node/NodeUtils.h
with
0 additions
and
36 deletions
Param/Node/NodeUtils.cpp
deleted
100644 → 0
+
0
−
32
View file @
ea2398c1
// ************************************************************************************************
//
// BornAgain: simulate and fit reflection and scattering
//
//! @file Param/Node/NodeUtils.cpp
//! @brief Implements collection of utility functions for INode.
//!
//! @homepage http://www.bornagainproject.org
//! @license GNU General Public License v3 or higher (see COPYING)
//! @copyright Forschungszentrum Jülich GmbH 2018
//! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
//
// ************************************************************************************************
#include
"Param/Node/NodeUtils.h"
#include
"Base/Util/Assert.h"
#include
<algorithm>
#include
<functional>
#include
<iterator>
std
::
vector
<
std
::
tuple
<
const
INode
*
,
int
,
const
INode
*>>
NodeUtils
::
progenyPlus
(
const
INode
*
node
,
int
level
)
{
ASSERT
(
node
);
std
::
vector
<
std
::
tuple
<
const
INode
*
,
int
,
const
INode
*>>
result
;
result
.
emplace_back
(
node
,
level
,
nullptr
);
for
(
const
auto
*
child
:
node
->
getChildren
())
{
for
(
const
auto
&
[
subchild
,
sublevel
,
subparent
]
:
progenyPlus
(
child
,
level
+
1
))
result
.
emplace_back
(
subchild
,
sublevel
,
child
);
}
return
result
;
}
This diff is collapsed.
Click to expand it.
Param/Node/NodeUtils.h
+
0
−
4
View file @
b1702567
...
...
@@ -27,10 +27,6 @@
namespace
NodeUtils
{
//! Returns a vector of triples (descendant, depth, parent)
std
::
vector
<
std
::
tuple
<
const
INode
*
,
int
,
const
INode
*>>
progenyPlus
(
const
INode
*
node
,
int
level
=
0
);
template
<
typename
T
>
std
::
vector
<
const
T
*>
ChildNodesOfType
(
const
INode
&
node
)
{
std
::
vector
<
const
T
*>
result
;
...
...
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