'Add an element to the matrix, checking that the position is unique.
@todo: parameter description'

def addElement(self, element):

    posn = element.posn()
    if (posn in self.matrix):
        msg = ('Attempting    to    add    data    %s    at    posn    %s.    This    is    already    taken    with    data    %s' % (element, posn, self.matrix[posn]))
        raise Exception(msg)
    self.matrix[posn] = element
    element.parents.append(self)
    if element.merged():
        self.joinElements(element)
    if ((element.row + element.mergeV) > self.lastRow):
        self.lastRow = (element.row + element.mergeV)
    if ((element.col + element.mergeH) > self.lastCol):
        self.lastCol = (element.col + element.mergeH)
