#define USECHRONO #undef HAVE_MPI #include "eval.hpp" #include #include #include #include #include using namespace aed; using namespace std; //---:---<*>---:---<*>- COMIENZA CODIGO FUNCION --:---<*>---:---<*>---:---<*> // COMPLETAR DNI y NOMBRE AQUI: // Nombre: Cardilli Justo int DNI=44427952; //---:---<*>---:---<*>---:---<*>---:---<*>---:---<*> void createab(btree &B, btree::iterator n,list &abpos,list &vals,int posicion=0) { if(abpos.empty()) return; //indico el corte //primero tomo los datos int abpos_front = abpos.front(); int val_front = vals.front(); //verifico en que lugar se inserta y luego borro si ya lo inserte if(abpos_front == posicion){ n=B.insert(n,val_front); abpos.pop_front(); vals.pop_front(); } //aplico recursividad respetando las posiciones if(!abpos.empty() and abpos.front()== 2*posicion+1 ){ createab(B,n.left(),abpos,vals,2*posicion+1); } if(!abpos.empty() and abpos.front()==2*posicion+2){ createab(B,n.right(),abpos,vals,2*posicion+2); } } //---:---<*>---:---<*>---:---<*>---:---<*>---:---<*> void createab(btree &B, list &abpos,list &vals) { createab(B,B.begin(),abpos,vals); } //---:---<*>---:---<*>- FINALIZA CODIGO FUNCION --:---<*>---:---<*>---:---<*> int main() { Eval ev; int vrbs=0; ev.eval<1>(createab,vrbs); // ev.evalr<1>(createab,12345,vrbs); return 0; }