diff --git a/include/aidge/graph/Node.hpp b/include/aidge/graph/Node.hpp index 9717999dad16f4ad37d1849c72da5d8f8e7d5dcc..118d925e1e5b7c4fcd0c353236998ff831f7e42d 100644 --- a/include/aidge/graph/Node.hpp +++ b/include/aidge/graph/Node.hpp @@ -163,13 +163,6 @@ public: return std::pair<NodePtr, IOIndex_t>(mParents[inID], mIdOutParents[inID]); } - /** - * @brief Set fix value for the specified input by creating a Producer wrapping the given Tensor. - * - * @param idx Input index. - * @param tensor Constant Tensor to add as parent for specified index. - */ - // void setInput(const IOIndex_t idx, const std::shared_ptr<Tensor> tensor); /** * @brief Get the lowest index in the InputData Parent list equal to the diff --git a/src/graphRegex/matchFsm/FsmEdge.cpp b/src/graphRegex/matchFsm/FsmEdge.cpp index d16dcf9505f5c3324fa621df2895065b7b019e19..638aad3bc3f5c94d5b20420ed8cc0799daa08cc0 100644 --- a/src/graphRegex/matchFsm/FsmEdge.cpp +++ b/src/graphRegex/matchFsm/FsmEdge.cpp @@ -42,7 +42,7 @@ void FsmEdge::reSetDestNode(const std::shared_ptr<FsmNode>& newDest){ } void FsmEdge::propagateRelativePos(void){ - std::set<int> myRelativeID; + std::set<std::size_t> myRelativeID; for (const auto& kvp : mRelativePos) { myRelativeID.insert(kvp.first); } @@ -56,31 +56,31 @@ void FsmEdge::propagateRelativePos(void){ } - std::set<int> nextRelativeID; + std::set<std::size_t> nextRelativeID; for (const auto& kvp : nextEdge->getRelative()) { nextRelativeID.insert(kvp.first); } // Find elements in myRelativeID but not in nextRelativeID - std::set<int> idxsToPush; + std::set<std::size_t> idxsToPush; std::set_difference(myRelativeID.begin(), myRelativeID.end(), nextRelativeID.begin(), nextRelativeID.end(), std::inserter(idxsToPush, idxsToPush.begin())); // Find elements in nextRelativeID but not in myRelativeID - std::set<int> idxsToGet; + std::set<std::size_t> idxsToGet; std::set_difference(nextRelativeID.begin(), nextRelativeID.end(), myRelativeID.begin(), myRelativeID.end(), std::inserter(idxsToGet, idxsToGet.begin())); - // test for integrity we look if 2 edge refert to the samme + // test for integrity we look if 2 edge refer to the same // ref and are link the ref dif is one // not working for common node // we can go deeper by find the all pass to a ref and see if the delta is good // Find elements present in both myRelativeID and nextRelativeID - std::set<int> idxsTotest; - for (int idx : nextRelativeID){ + std::set<std::size_t> idxsTotest; + for (auto idx : nextRelativeID){ if (myRelativeID.find(idx) != myRelativeID.end()){ if (std::abs(getRelative().at(idx) - nextEdge->getRelative().at(idx)) != 1) { throw std::runtime_error("Bad relative"); @@ -90,10 +90,10 @@ void FsmEdge::propagateRelativePos(void){ - // this egde have more relative info than the next + // this edge have more relative info than the next std::map<size_t,int> tmpRelative; // we push this info to the next - for( auto idxToPush :idxsToPush ){ + for(auto idxToPush :idxsToPush ){ tmpRelative.insert( std::make_pair(idxToPush, getRelative().at(idxToPush) +1)); } if(tmpRelative.size() != 0){ @@ -104,7 +104,7 @@ void FsmEdge::propagateRelativePos(void){ // the next node have more info than me i need to get it - for( auto idxToGet :idxsToGet ){ + for(auto idxToGet :idxsToGet ){ tmpRelative.insert( std::make_pair(idxToGet, nextEdge->getRelative().at(idxToGet) -1)); } if(tmpRelative.size() != 0){