public Dictionary <string, double> TrusteeTrustValues(Agent targetAgent, TrustAction action, TrustFunction[] trustFunctions) { Dictionary <string, double> result = new Dictionary <string, double>(); Trustee targetTrustee = Trustees[targetAgent.Name]; foreach (TrustFunction trustFunction in trustFunctions) { result.Add(trustFunction.ToString(), trustFunction.CalculateTrust(this, targetTrustee, action)); } return(result); }
public void UpdateTrustees(IEnumerable <Agent> trustees, IEnumerable <Feature> features) { foreach (Agent trustee in trustees) { var targetTrustee = GetTrustee(trustee); if (targetTrustee == null) { targetTrustee = new Trustee(trustee); AddTrustee(targetTrustee); } foreach (Feature feature in features) { targetTrustee.UpdateFeature(feature); } } }
public void AddTrustee(Trustee trustee) { Trustees.Add(trustee.Agent.Key, trustee); trustee.PropertyChanged += OnAgentNameChanged; }