Skip to content

Commit e0fcb2e

Browse files
committed
small changes
1 parent 4848874 commit e0fcb2e

3 files changed

Lines changed: 8 additions & 4 deletions

File tree

algorithms/tearing/tearing_impl.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,21 +59,22 @@ TearingData TearingV1::calculate(const DSBG& dsbg)
5959
Set e_scc = dsbg_.E().difference(e_notscc);
6060
while (!e_notscc.isEmpty()) {
6161
PWMap rmap = result.rmap();
62+
Set v_tear = rmap.image().difference(rmap.fixedPoints());
6263
Set v_tear = rmap.image(rmap.sharedImage());
6364

6465
PWMap tearIOMap = PW_FACT.createPWMap(v_tear).offsetImage(maxOffset);
6566
finalDSBG = finalDSBG.addSV(tearIOMap.image());
6667
maxOffset = finalDSBG.V().maxElem();
6768
tearIOMap_ = tearIOMap.combine(tearIOMap_);
68-
rmap = rmap.combine(tearIOMap.firstInv());
69+
rmap = rmap.combine(tearIOMap.firstInv()); // Separar
6970

7071
Set e_tear_scc = dsbg_.mapD().restrict(e_scc).preImage(v_tear);
7172
Set e_tear_notscc = dsbg_.mapB().restrict(e_notscc).preImage(v_tear);
7273
// PWMap mapB_scc = dsbg_.mapB().restrict(e_scc).composition(rmap); // Necessary?
7374
PWMap mapD_scc = dsbg_.mapD().restrict(e_tear_scc).composition(tearIOMap);
7475
PWMap mapB_notscc = dsbg_.mapB().restrict(e_tear_notscc).composition(tearIOMap);
7576
PWMap mapD_notscc = dsbg_.mapD().restrict(e_notscc).composition(rmap); // Necessary?
76-
77+
7778
finalMapB = mapB_notscc.combine(finalMapB);
7879
finalMapD = mapD_scc.combine(mapD_notscc).combine(finalMapD);
7980
dsbg_ = DSBG(finalDSBG.V().compact(), finalDSBG.Vmap().compact()

eval/visitors/expr_evaluator.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ ExprEvaluator::ExprEvaluator(EvalContext& eval_ctx) : eval_ctx_(eval_ctx)
7373
eval_ctx.insertFunction("sort", BuiltInFunctions::topoSortEvaluator);
7474
eval_ctx.insertFunction("cut", BuiltInFunctions::cutVertexEvaluator);
7575
eval_ctx.insertFunction("matchSCC", BuiltInFunctions::matchSCCEvaluator);
76+
// agregar funciones
7677
}
7778

7879
ExprBaseType ExprEvaluator::operator()(AST::Natural v) const

eval/visitors/func_evaluator.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include "algorithms/matching/matching_fact.hpp"
2323
#include "algorithms/misc/causalization_builders.hpp"
2424
#include "algorithms/scc/scc_fact.hpp"
25+
#include "algorithms/tearing/tearing_fact.hpp"
2526
#include "algorithms/toposort/ts_fact.hpp"
2627
#include "eval/visitors/func_evaluator.hpp"
2728
#include "util/debug.hpp"
@@ -621,9 +622,10 @@ ExprBaseType BuiltInFunctions::sccEvaluator(const EBTList& args)
621622
, "sccEvaluator: wrong number of arguments\n");
622623

623624
LIB::SCC scc_impl = LIB::SCC_FACT.createSCCAlgorithm();
625+
LIB::Tearing tearing_impl = LIB::TEARING_FACT.createTearingAlgorithm();
624626
const auto scc_evaluator = Overload {
625-
[&scc_impl](LIB::DSBG a) {
626-
return ExprBaseType(scc_impl.calculate(a).rmap());
627+
[&tearing_impl](LIB::DSBG a) {
628+
return ExprBaseType(tearing_impl.calculate(a).rmap());
627629
},
628630
[](auto a) {
629631
Util::ERROR("sccEvaluator: wrong argument ", a, " for scc\n");

0 commit comments

Comments
 (0)