public PolarBasedEngineSpecial(string path)
 {
     this.path = path;
     records   = new PaCell(pt_records, path + "rdfrecords.pac", false);
     if (records.IsEmpty)
     {
         records.Fill(new object[0]);
     }
     id_index      = new FreeIndex(path + "rdf_id", records.Root, 1);
     name_index    = new VectorIndex(path + "rdf_name", new PType(PTypeEnumeration.sstring), records.Root);
     inverse_index = new VectorIndexSpecial(path + "rdf_inverse", records.Root);
 }
Beispiel #2
0
 public PolarBasedEngineFlex(string path)
 {
     this.path = path;
     records   = new PaCell(pt_records, path + "rdfrecords.pac", false);
     if (records.IsEmpty)
     {
         records.Fill(new object[0]);
     }
     //id_index = new FreeIndex(path + "rdf_id", records.Root, 1);
     id_index   = new FlexIndex(path + "rdf_id", records.Root);
     name_index = new VectorIndex(path + "rdf_name", new PType(PTypeEnumeration.sstring), records.Root);
     triplets   = new PaCell(pt_triplets, path + "rdftriplets.pac", false);
     if (triplets.IsEmpty)
     {
         triplets.Fill(new object[0]);
     }
     direct_index  = new FlexIndex(path + "rdf_dir", triplets.Root);
     inverse_index = new FlexIndex(path + "rdf_inv", triplets.Root);
     if (toload_dic)
     {
         item_dic = id_index.GetAll().ToDictionary(ent => (string)ent.Field(1).Get());
     }
     //if (toload_dic) item_dic = records.Root.Elements().ToDictionary(ent => (string)ent.Field(1).Get());
 }