Skip to content

InteractionsProfile

Samuel Gomes edited this page Dec 2, 2019 · 12 revisions

InteractionsProfile

This class adds to the data model of an Interactions Profile some utility methods used to calculate distances.

Constructor

InteractionsProfile(K_i, K_cp, K_mh, K_pa): void

Attributes

Name: expected type Default value Description
K_i: float 0.0 The "individual" dimension. Ranges between 0.0 and 1.0.
K_cp: float 0.0 The "competition" dimension. Ranges between 0.0 and 1.0.
K_mh: float 0.0 The "mutual help" dimension. Ranges between 0.0 and 1.0.
K_pa: float 0.0 The "psychic altruistic" dimension. Ranges between 0.0 and 1.0.

Methods

distanceBetween(profileToTest): float

Description

Calculates the euclidean distance between this and other profile.

Name: expected type Default value Description
profileToTest: InteractionsProfile - The other profile to compare

sqrDistanceBetween(profileToTest): float

Description

Calculates the squared euclidean distance between this and other profile.

Name: expected type Default value Description
profileToTest: InteractionsProfile - The other profile to compare

normalizedDistanceBetween(profileToTest): float

Description

Calculates the normalized euclidean distance between this and other profile.

Name: expected type Default value Description
profileToTest: InteractionsProfile - The other profile to compare

reset(): void

Description

Sets all characteristics to the default values.

Clone this wiki locally