Graphical representation of the partition function of a one-dimensional δ-function Bose gas