/** Arbol B+ */
-#include "b_plus.h"
+#include "indices.h"
+#include "indice_bplus.h"
/**#*#*#*#*#**#*#*#*#*#* Private prototypes*#*#*#*#*#**#*#*#*#*#**#*#*#*/
-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_crearnodo(INDEXSPECS *idx);
+int b_plus_grabar_nodo(INDICE *idx, NODO_B_PLUS *nodo, int num_node);
+NODO_B_PLUS *b_plus_leer_nodo(INDICE *idx, int num_node);
+NODO_B_PLUS *b_plus_crearnodo(INDICE *idx);
int b_plus_destruir_nodo(NODO_B_PLUS *nodo);
-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);
-int b_plus_get_num_nodo(INDEXSPECS *idx);
+int b_plus_split_child(INDICE *idx, int numparent, NODO_B_PLUS *parent, int ithchild, NODO_B_PLUS *fullnode);
+int b_plus_insert_nonfull(INDICE *idx, NODO_B_PLUS *nodo, int num_nodo, INDEX_DAT *query);
+int b_plus_insertar(INDICE *idx, INDEX_DAT *query);
+int b_plus_get_num_nodo(INDICE *idx);
/**#*#*#*#*#**#*#*#*#*#*FIN PROTOTYPES*#*#*#*#*#**#*#*#*#*#**#*#*#*#*#*/
/** Crea un nuevo nodo y lo inicializa */
-NODO_B_PLUS *b_plus_crearnodo(INDEX *idx) {
+NODO_B_PLUS *b_plus_crearnodo(INDICE *idx) {
NODO_B_PLUS *nodo = (NODO_B_PLUS*)malloc(sizeof(NODO_B_PLUS));
if (nodo == NULL) return NULL;
}
/** Crea el archivo indice B+ */
-int emufs_b_plus_crear(INDEXSPECS *idx) {
+int emufs_b_plus_crear(INDICE *idx) {
FILE *fp;
NODO_B_PLUS *raiz;
* 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(INDEX *idx, INDEX_DAT *query, int num_node) {
+int emufs_b_plus_get_bloque(INDICE *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(INDEX *idx, int num_node) {
+NODO_B_PLUS *b_plus_leer_nodo(INDICE *idx, int num_node) {
/*int i = 0;*/
FILE *fp;
}
-int b_plus_grabar_nodo(INDEX *idx, NODO_B_PLUS *nodo, int num_node)
+int b_plus_grabar_nodo(INDICE *idx, NODO_B_PLUS *nodo, int num_node)
{
FILE *fp;
return 0;
}
-int b_plus_split_child(INDEX *idx, int numparent, NODO_B_PLUS *parent, int ithchild, NODO_B_PLUS *fullnode)
+int b_plus_split_child(INDICE *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(INDEX *idx, NODO_B_PLUS *nodo, int num_nodo, INDEX_DAT *query)
+int b_plus_insert_nonfull(INDICE *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(INDEX *idx, INDEX_DAT *query)
+int emufs_b_plus_insertar(INDICE *idx, INDEX_DAT *query)
{
NODO_B_PLUS *raiz;
return 0;
}
-int b_plus_get_num_nodo(INDEX *idx)
+int b_plus_get_num_nodo(INDICE *idx)
{
FILE *fp;
int num;
} NODO_B_PLUS;\r
\r
/** TODO */\r
-int emufs_b_plus_crear(INDEX *idx);\r
-int emufs_b_plus_get_bloque(INDEX *idx, INDEX_DAT *query, int num_node);\r
-int emufs_b_plus_insertar(INDEX *idx, INDEX_DAT *query);\r
+int emufs_b_plus_crear(INDICE *idx);\r
+int emufs_b_plus_get_bloque(INDICE *idx, INDEX_DAT *query, int num_node);\r
+int emufs_b_plus_insertar(INDICE *idx, INDEX_DAT *query);\r
int emufs_b_plus_actualizar_nodo(INDEX_DAT *dataset);\r
int emufs_b_plus_buscar();\r
int emufs_b_plus_destuir();\r
-NODO_B_PLUS *b_plus_leer_nodo(INDEX *idx, int num);\r
+NODO_B_PLUS *b_plus_leer_nodo(INDICE *idx, int num);\r
\r
#endif