Skip to content

InteractionsProfile

Samuel Gomes edited this page Jul 2, 2024 · 12 revisions

InteractionsProfile

This class defines an interaction preference profile. It includes some methods that can be used to transform and manipulate the profile.

Constructor

+ InteractionsProfile(dimensions: object): void

Attributes

Name: expected type Default value Description
dimensions: object {} The dictionary of dimension keys to values.

Methods

+ reset(): void

Description

Sets all dimensions to 0.

+ init(): void

Description

Resets and normalizes the profile.

+ generateCopy(): InteractionsProfile

Description

Returns a copy of the caller.

- normalization(profile: InteractionsProfile): InteractionsProfile

Description

(auxiliary) Returns a normalized copy of a given profile.

+ normalize(): InteractionsProfile

Description

Normalizes the caller and returns it.

+ normalized(): InteractionsProfile

Description

Returns a normalized copy of the caller.

- randomization(profile: InteractionsProfile): InteractionsProfile

Description

(auxiliary) Returns a randomized copy of profile.

+ randomize(): InteractionsProfile

Description

Randomizes the caller and returns it.

+ randomized(): InteractionsProfile

Description

Returns a randomized copy of the caller.

+ distanceBetween(profileToTest: InteractionsProfile): float

Description

Calculates the euclidean distance between this and other profile.

+ sqrDistanceBetween(profileToTest: InteractionsProfile): float

Description

Calculates the squared euclidean distance between this and other profile.

+ flattened(): object[]

Description

Returns an array with the values of the dimensions of the caller.

+ unflatten(array: object[]): InteractionsProfile

Description

Assigns dimensions values of the caller as the elements of a given array in the same order. Returns the updated caller.

+ unflattened(array: object[]): InteractionsProfile

Description

Assigns dimensions values as the elements of a given array in the same order. Returns a copy of the caller.

- unflattenFunc(profile: InteractionsProfile, array: object[]): InteractionsProfile

Description

(auxiliary) Assigns dimensions values of a given profile as the elements of a given array in the same order.

Clone this wiki locally