# Foundations

## Conceptual

How can you compare two objects?
Identity ("=="-operator)
Nominal => Equality
Ordinal => Comparable
Exact Metric =>
Approximated Metric => Delta

Which features are interesting?
occurencies
frequencies when duplicates exist
orders and positions (if no duplicates exist)

General:

```RawDiff
-------------------------------
RawDiff compares item by item.

ExhaustiveDiff vs. FirstHitDiff
-------------------------------
FirstHitDiff aborts when it discovers the first difference.
ExhaustiveDiff terminates when it has found ALL differences.

FullDiff vs. SelectiveDiff
-----------------------
SelectiveDiff compares only selected properties while FullDiff considers ALL fields/properties.

OccurenceDiff vs. FrequencyDiff vs. OrderDiff
-------------------------
OccurenceDiff is only interested on the occurencies of elements.
FrequencyDiff, however, focuses on the frequencies.
OrderDiff detects when the positions of elements have been altered.

PureDiff vs. CompleteDiff
------------------------
PureDiff contains only differences.
CompleteDiff also mentions what has been retained.

DeepDiff vs. ShallowDiff
------------------------
DeepDiff follows references of fields.
ShallowDiff

TreeDiff:
------------------------
LoopDiff vs. RecursiveDiff
```

## Algorithmic

Three scenarios are always distinguished: best, average and worst.

The Landau-notation describes the complexity classes.
O(1), O(log(n)), O(n), O(n*log(n)), O(n^2), O(n^3), O(n!), O(2^n)