예제 #1
0
        public void LoadTree(string fileName)
        {
            if (!File.Exists(fileName))
            {
                return;
            }
            try
            {
                Stream stream = File.Open(fileName, FileMode.Open);
                //BinaryFormatter bFormatter = new BinaryFormatter();
                // XmlSerializer ser = new XmlSerializer(typeof(SerializableDictionary<string, profileNode>));
                XmlSerializer ser = new XmlSerializer(typeof(ProfileTree));
                // SerializableDictionary<string, profileNode> localProfiles = (SerializableDictionary<string, profileNode>)ser.Deserialize(stream);
                ProfileTree localProfiles = (ProfileTree)ser.Deserialize(stream);
                this.masterNode = localProfiles.masterNode;
                //this.masterNode = localProfiles;
                this.combine = localProfiles.combine;



                stream.Close();
            }
            catch (Exception)
            {
            }
        }
예제 #2
0
        public void GenerateAutomaticProfiles(string fileName)
        {
            ProfileTree t           = ProfileAutomatic.AnalyseProfileFile(fileName, SIMDIST.DISTANCE);
            string      profileName = "automatic_distance.profile";

            t.SaveProfiles(profileName);
            hammingProfile = profileName;
        }
예제 #3
0
        public void GenerateAutomaticProfiles(string fileName)
        {
            ProfileTree t           = ProfileAutomatic.AnalyseProfileFile(fileName, SIMDIST.SIMILARITY);
            string      profileName = "automatic_similarity.profile";

            t.SaveProfiles(profileName);
            this.profileName    = profileName;
            this.profileNameReg = profileName;
        }
예제 #4
0
        public void GenerateAutomaticProfiles(string fileName)
        {
            ProfileTree t           = ProfileAutomatic.AnalyseProfileFile(fileName, SIMDIST.DISTANCE);
            string      profileName = "automatic_distance.profile";

            t.SaveProfiles(profileName);
            hammingProfile = profileName;
            t           = ProfileAutomatic.AnalyseProfileFile(fileName, SIMDIST.SIMILARITY);
            profileName = "automatic_similarity.profile";
            t.SaveProfiles(profileName);
            jury1DProfile = profileName;
        }
예제 #5
0
        public void Prepare(List <KeyValuePair <string, string> > profilesStr, string profName, string profFile)
        {
            r = new ProfileTree();
            r.LoadProfiles(profFile);

            foreach (var item in profilesStr)
            {
                List <string> aux = new List <string>(item.Value.Length);
                for (int i = 0; i < item.Value.Length; i++)
                {
                    aux.Add(item.Value[i].ToString());
                }

                r.AddItemsCombineStates(item.Key, aux);
            }
        }
예제 #6
0
 public Alignment()
 {
     r = new ProfileTree();
     dirSettings.Load();
 }