/// <summary> /// Calculate the Social Importance value of a given target, in a particular perspective. /// If no perspective is given, the current agent's perspective is used as default. /// </summary> /// <remarks> /// All values calculated by this method are automatically cached, in order to optimize future searches. /// If the values are needed to be recalculated, call InvalidateCachedSI() to clear the cached values. /// </remarks> /// <param name="target">The name of target which we want to calculate the SI</param> /// <param name="perspective">From which perspective do we want to calculate de SI.</param> /// <returns>The value of Social Importance attributed to given target by the perspective of a particular agent.</returns> public float GetSocialImportance(string target, string perspective = "self") { ValidateKBLink(); var t = Name.BuildName(target); if (!t.IsPrimitive) { throw new ArgumentException("must be a primitive name", nameof(target)); } var p = m_kB.AssertPerspective(Name.BuildName(perspective)); return(internal_GetSocialImportance(t, p)); }