public virtual void Build(PolyIndexLC_Composite original, int lambda_search, int lambda_filter, SequenceBuilder seq_builder = null) { base.Build (original.LC_LIST, lambda_search, seq_builder); var pmi = new PolyIndexLC(); pmi.Build((original.IDX as PolyIndexLC).LC_LIST, lambda_filter, null); this.IDX = pmi; }
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); }