/// <summary> /// 获取值和名称都相同的向量 /// </summary> /// <param name="fixedAmbiguities"></param> /// <returns></returns> public Vector GetSame(Vector fixedAmbiguities) { if (fixedAmbiguities == null) { return(new Vector()); } List <double> vals = new List <double>(); var names = new List <string>(); foreach (var item in this.ParamNames) { if (fixedAmbiguities.Contains(item) && fixedAmbiguities[item] == this[item]) { vals.Add(this[item]); names.Add(item); } } return(new Vector(vals, names)); }