import torch


def simple_skyline(points, max_height, min_height):

    """
    Generates a simple skyline output tensor. The user can provide
    the max & min of the amplitudes.

    :param points: number of points in the skyline function
    :param max_height: max amplitude in the skyline function
    :param min_height: min amplitude in the skyline function
    :return: skyline output tensor
    """

    w, h = [], []
    w.append(points)
    h.append(0)
    w.append(points)
    h.append(max_height)
    w.append(points)
    h.append(0)
    w.append(points)
    h.append(min_height)
    w.append(points)
    h.append(0)

    start = 0
    signal = torch.zeros((1, 5 * points, 1), dtype=torch.float64)
    for i, j in zip(w, h):
        line = j * torch.ones((1, i, 1), dtype=torch.float64)
        signal[:, start: start + i, :] = line[:, :, :]
        start += i

    return signal