public void Build(MetricDB db, int sample_size, int num_instances, SequenceBuilder seq_builder = null) { this.DB = db; this.lsc_indexes = new LSC[num_instances]; // IPermutation perm = null; for (int i = 0; i < num_instances; ++i) { var lsc = new LSC_H8 (); lsc.Build(db, sample_size, seq_builder); this.lsc_indexes[i] = lsc; } }
public void Build(MetricDB db, int sampleSize, int numInstances, SequenceBuilder seq_builder = null) { this.DB = db; IPermutation perm = null; for (int i = 0; i < numInstances; ++i) { var lsc = new LSC_H8 (); //var _indexName = outname + String.Format (".instance-{0:00}.xml", i); //lsc.SeqBuilder = this.SeqBuilder; if (i == 0) { lsc.Build (db, sampleSize, seq_builder); var seq = lsc.GetSeq () as SeqXLB; if (seq == null) { throw new ArgumentException ("seq_builder should return an SeqXLB instance"); } perm = seq.GetPERM (); } else { lsc.Build (db, sampleSize, seq_builder, (int p) => this.DB [perm [p]]); } } }
public void TestLSC_H8(MetricDB db, string name, string queries) { var reslist = new List<string> (); // LSC_H1 reslist.Add(_Test("Index.LSC_H8." + name, db, () => { var idx = new LSC_H8(); idx.Build(db, 20); return idx; }, queries)); // MLSC_H8 reslist.Add(_Test("Index.MLSC_H8." + name, db, () => { var idx = new MLSC_H8(); idx.Build(db, 20, 4); return idx; }, queries)); // LSC_Cyclic8 reslist.Add(_Test("Index.LSC_Cyclic8." + name, db, () => { var idx = new LSC_CyclicH8(); idx.Build(db, 20); return idx; }, queries)); // MLSC_Cyclic8 reslist.Add(_Test("Index.MLSC_Cyclic8." + name, db, () => { var idx = new MLSC_CyclicH8(); idx.Build(db, 20, 4); return idx; }, queries)); reslist.Add("--horizontal"); Commands.Check(reslist); }