/**
 * Helper function to calculate complex conjugate of a pair representing a complex number.
 */
fun conjugate(x: Pair<Double, Double>): Pair<Double, Double> {

    return Pair(x.first, -x.second)
}
/**
 * Helper function to calculate complex conjugate of a pair representing a complex number.
 */
fun conjugate(x: Pair<Double, Double>): Pair<Double, Double> {
/**
 * Helper function to calculate complex conjugate of a pair representing a complex number.
 */
fun conjugate(x: Pair<Double, Double>): Pair<Double, Double> {

    return Pair(x.first, -x.second)
}