/// <summary> /// Gets the scoring parameter set for the given activation method. /// </summary> /// <param name="activationMethod">The activation method to find scoring parameters for.</param> /// <returns>Array of scoring parameters sorted by the mass of each parameter bin.</returns> public ScoringParameters[] GetScoringParameters(ActivationMethod activationMethod) { var searchParamDesc = new ScoringParameterDescription { ActivationMethod = activationMethod, IsTopDown = this.isTopDown }; ScoringParameters[] parameters; if (this.scoringParameters.ContainsKey(searchParamDesc)) { // Seen this activation method already. parameters = this.scoringParameters[searchParamDesc]; } else { // Haven't seen this activation method yet. Try to load it from file. parameters = ScoringParameters.Parse(searchParamDesc.GetPath()); this.scoringParameters.Add(searchParamDesc, parameters); } return(parameters); }
/// <summary> /// Overloaded equals. Compares based on <see cref="ActivationMethod" /> and <see cref="IsTopDown" />. /// </summary> /// <param name="other">The scoringparameter description to compare to.</param> /// <returns>A value indicating whether the scoring parameter is equal to the other parameter.</returns> protected bool Equals(ScoringParameterDescription other) { return(this.ActivationMethod == other.ActivationMethod && this.IsTopDown == other.IsTopDown); }