mycmd(a, args, source) { unless (source) source = previous_object(); // really needed??? string *stack=allocate(0); if (v("stack")){ stack=v("stack"); } switch (a){ case "push": stack=stack + ({ARGS(1)}); vSet("stack", stack); castmsg(ME, "_notice_public_stack_add", "Eintrag #[_num] hinzugefuegt: "+stack[sizeof(stack)-1], (["_nick": "stack", "_num": sizeof(stack)])); break; case "get": if(sizeof(stack)>0){ if(sizeof(args)==1){ castmsg(ME, "_notice_public_stack", "Eintrag #[_num]: "+stack[sizeof(stack)-1], (["_nick": "stack", "_num": sizeof(stack)])); }else{
CondensationOut build_condensation() { std::vector< Vertex > top_sort = topological_sort(); in_sort.clear(); out_sort.clear(); used.clear(); cond.clear(); for (auto v = top_sort.rbegin(); v != top_sort.rend(); ++v) { if (used.find(v) == used.end()) { this->dfs< Transposed >(v); cond.push_back(vSet(in_sort.begin(), in_sort.end())); in_sort.clear(); } } return cond; }