示例#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();
 }