00001
00037 #if !defined(TrieSDisco_hpp)
00038 #define TrieSDisco_hpp
00039
00040 #include <iostream>
00041 #include <iomanip>
00042 #include <list>
00043 #include <vector>
00044
00045 #include "NodoTrieS.hpp"
00046
00047 using namespace std;
00048
00049 #include "Pos.hpp"
00050 #include "Doc.hpp"
00051
00062 long
00063 escribeNodo(iostream &os, string c, set<Pos> *cpos,
00064 long dhijos, long desp = 0) ;
00065
00074 long
00075 precalcula_escribe_actual(int longcad, set<Pos> *cpos);
00076
00077
00097 long escribeCopiaNodo(iostream &os, istream &is, long &phijo,
00098 vector<long>* renum);
00099
00100
00111 long escribeCopiaSubarbol(iostream &os, istream &is, bool conHermanos,
00112 vector<long> *renum = NULL);
00113
00114
00138 long mezclaRec(istream &is1, istream &is2, iostream &os,
00139 bool conHermanos1, bool conHermanos2,
00140 vector<long> *renum1, vector<long> *renum2);
00141
00154 long eliminaDoc(istream &is, iostream &os, long n, vector<long> *renum);
00155
00156
00157
00163 void verificaIndice(istream &is);
00164
00172 set<Pos> *buscaPlano(char *na, char *nrel, string pal, vector<Doc> &docs);
00173
00174
00180 set<Pos> *buscaPlanoStream(std::istream &is, string pal) throw(char *);
00181
00182
00183
00191 unsigned long leeRelacion(char *nrel, vector<Doc> &docs);
00192
00193
00201 void escribeRelacion(char *nrel, vector<Doc> &docs,
00202 vector<long> *reord = NULL);
00203
00204
00205
00206 #endif