PrimitiveSimilarity.h
Go to the documentation of this file.
1#pragma once
2
9
11{
12 // checks for equality of two primitive values and returns 1.0f if they are equal, 0.0f otherwise
13 float calculateSimilarity(const aron::data::Bool& oldValue, const aron::data::Bool& newValue);
14
15 // calculates the similarity of two numbers based on their absolute distance
16 // and normalizes it to a value between 0.0f and 1.0f
17 float calculateSimilarity(const aron::data::Int& oldValue, const aron::data::Int& newValue);
18 float calculateSimilarity(const aron::data::Long& oldValue, const aron::data::Long& newValue);
19 float calculateSimilarity(const aron::data::Float& oldValue, const aron::data::Float& newValue);
20 float calculateSimilarity(const aron::data::Double& oldValue, const aron::data::Double& newValue);
21
22 // calculates the similarity of two strings based on their edit distance (levenshtein distance)
23 // and normalizes it to a value between 0.0f and 1.0f
24 float calculateSimilarity(const aron::data::String& oldValue, const aron::data::String& newValue);
25}
26
float calculateSimilarity(const aron::data::Bool &oldValue, const aron::data::Bool &newValue)