Exemple #1
0
 public virtual void Build(MetricDB db, int numcenters, int lambda_search, int lambda_filter, SequenceBuilder seq_builder = null)
 {
     var L = new LC_RNN[lambda_search];
     var M = new LC_RNN[lambda_filter];
     var builder = SequenceBuilders.GetSeqPlain (short.MaxValue, ListIBuilders.GetListIFS (), null, true);
     var A = new List<Action>();
     for (int i = 0; i < lambda_search; ++i) {
         A.Add(this.BuildOneClosure(L, i, db, numcenters, seq_builder));
     }
     for (int i = 0; i < lambda_filter; ++i) {
         A.Add(this.BuildOneClosure(M, i, db, numcenters, builder));
     }
     var ops = new ParallelOptions();
     ops.MaxDegreeOfParallelism = -1;
     Parallel.ForEach(A, ops, (action) => action());
     var poly_filter = new PolyIndexLC();
     poly_filter.Build(M, 0, null);
     this.Build(poly_filter, L);
 }
Exemple #2
0
 public virtual void Build(LC_RNN lc, SequenceBuilder seq_builder = null)
 {
     this.COV = lc.COV;
     this.DB = lc.DB;
     this.CENTERS = new List<int>(lc.CENTERS);
     var S = lc.SEQ.GetRawSeq();
     if (seq_builder == null) {
         seq_builder = SequenceBuilders.GetIISeq(BitmapBuilders.GetPlainSortedList());
     }
     this.SEQ = seq_builder(S, lc.SEQ.Sigma);
 }