DoublePair class