10 #include "Acts/Utilities/Enumerate.hpp"
16 return m_connector && numFeatures();
18 bool NodeFeatureList::setConnector(
const std::string& conName, MsgStream&
msg) {
20 return m_connector !=
nullptr;
24 m_connector = std::make_unique<NodeConnector>(conName, evalFunc);
27 if (numFeatures() !=
other.numFeatures()) {
30 if (!m_connector || !
other.m_connector || m_connector->name() !=
other.m_connector->name()) {
33 for (
size_t f =0 ;
f < numFeatures(); ++
f) {
34 if (m_features[
f]->
name() !=
other.m_features[
f]->name()) {
40 size_t NodeFeatureList::numFeatures()
const {
41 return m_features.size();
45 std::vector<std::string> NodeFeatureList::featureNames()
const {
46 std::vector<std::string>
names{};
52 bool NodeFeatureList::addFeature(
const std::string& featName, MsgStream&
msg) {
56 bool NodeFeatureList::addFeature(
const Feature_t& newFeat, MsgStream&
msg) {
58 msg<<MSG::ERROR<<
"No feature has been parsed. "<<
endmsg;
61 if (std::ranges::find_if(m_features, [&newFeat](
const Feature_t&
known){
62 return known == newFeat ||
known->name() == newFeat->name();
63 }) != m_features.end()) {
64 msg<<MSG::ERROR<<
" The feature "<<newFeat->name()<<
" has already been added & "
65 <<
" cannot be added again. "<<
endmsg;
71 m_features.push_back(newFeat);
75 void NodeFeatureList::fillInData(
const Bucket_t& bucket,
77 for (
size_t sp = 0 ; sp < bucket.size(); ++sp) {
81 (*prepGraph.
currLeave++) = feat->eval(bucket, sp);
83 for (
size_t ot = 0;
ot < sp; ++
ot) {
86 if (m_connector->connect(bucket, sp,
ot)) {
88 prepGraph.
srcEdges.emplace_back(from);
92 prepGraph.
desEdges.emplace_back(from);