#define USECHRONO #undef HAVE_MPI #include "eval.hpp" #include #include #include #include using namespace aed; using namespace std; //---:---<*>---:---<*>- COMIENZA CODIGO FUNCION --:---<*>---:---<*>---:---<*> // COMPLETAR DNI y NOMBRE AQUI: // Nombre: Padró Santiago int DNI=44843361; //---:---<*>---:---<*>---:---<*>---:---<*>---:---<*> ///Funcion Auxiliar void listab(btree &B, btree::iterator itB, int abpos, list &abposList, list &valList) { if(itB == B.end()) return; /*Si el iterador llega al final del arbol se termina la funcion*/ abposList.push_back(abpos); /*Agregamos la posicion actual del nodo a la lista*/ valList.push_back(*itB); /*Agregamos el valor actual del nodo a la lista*/ if(itB.left() != B.end()){ /*Si el nodo actual tiene hijo izquierdo*/ listab(B, itB.left(), 2 * abpos + 1, abposList, valList); /*Llamamos recursivamente a la funcion para insertar los elementos*/ } if(itB.right() != B.end()){ /*Si el nodo actual tiene hijo derecho*/ listab(B, itB.right(), 2 * abpos + 2, abposList, valList); /*Llamamos recursivamente a la funcion para insertar los elementos*/ } } ///Funcion Wrapper void listab(btree &B, list &abpos, list &vals) { listab(B, B.begin(), 0, abpos, vals); /*Llamamos la funcion auxiliar recursivamente*/ } //---:---<*>---:---<*>- FINALIZA CODIGO FUNCION --:---<*>---:---<*>---:---<*> int main() { Eval ev; int vrbs=0; ev.eval<1>(listab,vrbs); ev.evalr<1>(listab,12345,vrbs); return 0; }