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) { } }
public void GenerateAutomaticProfiles(string fileName) { ProfileTree t = ProfileAutomatic.AnalyseProfileFile(fileName, SIMDIST.DISTANCE); string profileName = "automatic_distance.profile"; t.SaveProfiles(profileName); hammingProfile = profileName; }
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; }
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; }
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); } }
public Alignment() { r = new ProfileTree(); dirSettings.Load(); }