Esempio n. 1
0
 public AdaptiveNeighborhoodHash(MultiNeighborhoodHash m)
     : base()
 {
     this.A = m.A;
     this.DB = m.DB;
 }
Esempio n. 2
0
        public static List<string> ExecuteMultiNeighborhoodHash(IndexArgumentSetup setup, string nick, double expected_recall, int max_instances)
        {
            var idxname = String.Format ("{0}/Index.MultiNeighborhoodHash.max_instances={1}-qarg={2}-expected-recall={3}", nick, max_instances, setup.QARG, expected_recall);
            var resname = Execute (setup, nick, idxname, (db) => {
                var parameters = MultiNeighborhoodHash.EstimateParameters (db, max_instances, (int)Math.Abs (setup.QARG), expected_recall, 96);
                /*if (parameters.NumberOfInstances == 1) {
                    idx = parameters.Index;
                } else {*/
                var IDX = new MultiNeighborhoodHash ();
                IDX.Build (db, parameters);
                return IDX;
            });
            var resnameList = new List<string> ();
            resnameList.Add (resname);

            resname = GetResultName (nick, idxname, setup, "Adaptive");
            resnameList.Add (resname);

            if (!File.Exists (resname)) {
                var idx = IndexGenericIO.Load (idxname);
                idx = new AdaptiveNeighborhoodHash(idx as MultiNeighborhoodHash);
                PerformSearch (resname, idx, idxname, setup);
            }
            return resnameList;
        }