Skip to content
Snippets Groups Projects

Refactor/recipies

Merged vincent lorrain requested to merge refactor/recipies into main
30 files
+ 397
2143
Compare changes
  • Side-by-side
  • Inline
Files
30
+ 0
63
/********************************************************************************
* Copyright (c) 2023 CEA-List
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* SPDX-License-Identifier: EPL-2.0
*
********************************************************************************/
#ifndef AIDGE_GREGEX_H_
#define AIDGE_GREGEX_H_
#include <stdexcept> // for exception, runtime_error, out_of_range
#include <regex>
#include <memory> // for shared_ptr
#include <algorithm> // for next_permutation
#include "aidge/graphmatching/Utile.hpp"
#include "aidge/graphmatching/StmFactory.hpp"
#include "aidge/graphmatching/SeqStm.hpp"
#include "aidge/graphmatching/NodeRegex.hpp"
#include "aidge/graphmatching/Match.hpp"
namespace Aidge{
class GRegex {
// __init__(self,nodes_regex:dict,seq_regexps:list)
StmFactory mStmFab;
std::vector<SeqStm*> mStmInit;
public:
GRegex(const std::map<std::string,NodeRegex*>& nodesRegex,std::vector<std::string>& seqRegexps );
std::set<NodeTmp> matchFromStartNodes(const std::vector<NodeTmp> startNodes,const std::shared_ptr<GraphView> graphToMatch);
bool walk_validation_all_stm_are_valid(const std::vector<std::vector<SeqStm*>> all_stm);
bool walk_validation_all_node_read_validate_by_one_stm(const std::vector<std::vector<SeqStm*>> all_stm);
bool walk_validation_common_nodes_same_tag_for_all_stm(const std::vector<std::vector<SeqStm*>> all_stm);
std::set<NodeTmp> get_all_validate_nodes(const std::vector<std::vector<SeqStm*>> all_stm);
std::vector<SeqStm*> getStmInit() const {
return mStmInit;
}
StmFactory getStmFab() const {
return mStmFab;
}
//std::set<std::pair<std::vector<NodeTmp>,std::set<NodeTmp>>> match(const std::shared_ptr<GraphView> graphToMatch);
Match match(const std::shared_ptr<GraphView> graphToMatch);
};
}
#endif //AIDGE_GREGEX_H_
\ No newline at end of file
Loading