Inheritance: BasicIndex
Ejemplo n.º 1
0
 //        public void SetQueryExpansion()
 //        {
 //            for (int i = 0; i < this.A.Length; ++i) {
 //                this.A[i] = new KnrLSHQueryExpansion(this.A[i]);
 //            }
 //        }
 //
 //        public void UnsetQueryExpansion()
 //        {
 //            for (int i = 0; i < this.A.Length; ++i) {
 //                this.A[i] = new KnrLSH(this.A[i]);
 //            }
 //        }
 public void Build(MNappHash I, int num_instances)
 {
     this.A = new NappHash[num_instances];
     this.DB = I.DB;
     this.hplanes = I.hplanes;
     for (int i = 0; i < num_instances; ++i) {
         this.A[i] = I.A[i];
     }
 }
Ejemplo n.º 2
0
 public void Build(MetricDB db, int K, int num_refs, int num_instances, HyperplaneFP hpfp)
 {
     this.A = new NappHash[num_instances];
     this.DB = db;
     var seed = RandomSets.GetRandomInt ();
     int I = 0;
     for (int i = 0; i < num_instances; ++i) {
         this.A[i] = new NappHash();
         this.A[i].Build(db, K, num_refs, RandomSets.GetRandom(seed + i));
         ++I;
         Console.WriteLine ("=== Created {0}/{1} K:{2}, {3}", I, num_instances, K, this);
     }
     this.hplanes = hpfp;
 }
Ejemplo n.º 3
0
 public void SetHyperplanes(int numhyperplanes)
 {
     this.hplanes = new HyperplaneFP ();
     this.hplanes.Build (this.DB, numhyperplanes);
 }