/** Arbol B+ */
#include "b_plus.h"
-#define INDEXSPECS INDICE
+
/**#*#*#*#*#**#*#*#*#*#* Private prototypes*#*#*#*#*#**#*#*#*#*#**#*#*#*/
-/* numerando los bloques */
int b_plus_grabar_nodo(INDEXSPECS *idx, NODO_B_PLUS *nodo, int num_node);
-/*NODO_B_PLUS *b_plus_leer_nodo(INDEXSPECS *idx, int num_node);*/
+NODO_B_PLUS *b_plus_leer_nodo(INDEXSPECS *idx, int num_node);
NODO_B_PLUS *b_plus_crearnodo(INDEXSPECS *idx);
int b_plus_destruir_nodo(NODO_B_PLUS *nodo);
-/*int b_plus_insertar_clave(INDEXSPECS *idx, INDEX_DAT *query);*/
int b_plus_split_child(INDEXSPECS *idx, int numparent, NODO_B_PLUS *parent, int ithchild, NODO_B_PLUS *fullnode);
int b_plus_insert_nonfull(INDEXSPECS *idx, NODO_B_PLUS *nodo, int num_nodo, INDEX_DAT *query);
int b_plus_insertar(INDEXSPECS *idx, INDEX_DAT *query);
/**#*#*#*#*#**#*#*#*#*#*FIN PROTOTYPES*#*#*#*#*#**#*#*#*#*#**#*#*#*#*#*/
/** Crea un nuevo nodo y lo inicializa */
-NODO_B_PLUS *b_plus_crearnodo(INDEXSPECS *idx) {
+NODO_B_PLUS *b_plus_crearnodo(INDEX *idx) {
NODO_B_PLUS *nodo = (NODO_B_PLUS*)malloc(sizeof(NODO_B_PLUS));
if (nodo == NULL) return NULL;
* return -1 - No hay clave, inserto clave de nuevo bloques
* return 1 - Hubo falla de lectura de un nodo, Abortar
*/
-int emufs_b_plus_get_bloque(INDEXSPECS *idx, INDEX_DAT *query, int num_node) {
+int emufs_b_plus_get_bloque(INDEX *idx, INDEX_DAT *query, int num_node) {
NODO_B_PLUS *nodo;
nodo = b_plus_leer_nodo(idx,num_node);
}
}
-NODO_B_PLUS *b_plus_leer_nodo(INDEXSPECS *idx, int num_node) {
+NODO_B_PLUS *b_plus_leer_nodo(INDEX *idx, int num_node) {
/*int i = 0;*/
FILE *fp;
}
-int b_plus_grabar_nodo(INDEXSPECS *idx, NODO_B_PLUS *nodo, int num_node)
+int b_plus_grabar_nodo(INDEX *idx, NODO_B_PLUS *nodo, int num_node)
{
FILE *fp;
return 0;
}
-int b_plus_split_child(INDEXSPECS *idx, int numparent, NODO_B_PLUS *parent, int ithchild, NODO_B_PLUS *fullnode)
+int b_plus_split_child(INDEX *idx, int numparent, NODO_B_PLUS *parent, int ithchild, NODO_B_PLUS *fullnode)
{
/* locals */
int minclaves = ceil(idx->size_hijos/sizeof(int)/2)-1;
}
-int b_plus_insert_nonfull(INDEXSPECS *idx, NODO_B_PLUS *nodo, int num_nodo, INDEX_DAT *query)
+int b_plus_insert_nonfull(INDEX *idx, NODO_B_PLUS *nodo, int num_nodo, INDEX_DAT *query)
{
int i, num_nodo_hijo;
NODO_B_PLUS *hijo;
return 0;
}
-int emufs_b_plus_insertar(INDEXSPECS *idx, INDEX_DAT *query)
+int emufs_b_plus_insertar(INDEX *idx, INDEX_DAT *query)
{
NODO_B_PLUS *raiz;
return 0;
}
-int b_plus_get_num_nodo(INDEXSPECS *idx)
+int b_plus_get_num_nodo(INDEX *idx)
{
FILE *fp;
int num;