Skip to content
Snippets Groups Projects
Commit b1702567 authored by Matthias Puchner's avatar Matthias Puchner
Browse files

rm obsolete code

parent ea2398c1
No related branches found
No related tags found
1 merge request!517refactor sample builder
Pipeline #51519 passed
// ************************************************************************************************
//
// 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;
}
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment